<!-- HTML header for doxygen 1.8.8-->
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
    <head>
        <meta http-equiv="X-UA-Compatible" content="IE=edge">
        <!-- For Mobile Devices -->
        <meta name="viewport" content="width=device-width, initial-scale=1">
        <meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
        <meta name="generator" content="Doxygen 1.8.17"/>
        <script type="text/javascript" src="https://code.jquery.com/jquery-2.1.1.min.js"></script>
        <title>QuEST: QuEST.c File Reference</title>
        <!--<link href="tabs.css" rel="stylesheet" type="text/css"/>-->
        <script type="text/javascript" src="dynsections.js"></script>
        <link href="doxygen.css" rel="stylesheet" type="text/css" />
        <link href="style.css" rel="stylesheet" type="text/css"/>
        <link href='https://fonts.googleapis.com/css?family=Roboto+Slab' rel='stylesheet' type='text/css'>
        <link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.6/css/bootstrap.min.css">
        <script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.6/js/bootstrap.min.js"></script>
        <link href="jquery.smartmenus.bootstrap.css" rel="stylesheet">
        <script type="text/javascript" src="jquery.smartmenus.js"></script>
        <!-- SmartMenus jQuery Bootstrap Addon -->
        <script type="text/javascript" src="jquery.smartmenus.bootstrap.js"></script>
        <!-- SmartMenus jQuery plugin -->
    </head>
    <body>
        <nav class="navbar navbar-default" role="navigation">
            <div class="container">
                <div class="navbar-header">
                    <a class="navbar-brand"><img alt="Logo" src="logo.png"/></a>
                    <a class="navbar-brand"><b>QuEST</b> v3.2.0<br>The Quantum Exact Simulation Toolkit</a>
                </div>
            </div>
        </nav>
        <div id="top"><!-- do not remove this div, it is closed by doxygen! -->
            <div class="content" id="content">
                <div class="container">
                    <div class="row">
                        <div class="col-sm-12 panel " style="padding-bottom: 15px;">
                            <div style="margin-bottom: 15px;">
<!-- end header part -->
<!-- Generated by Doxygen 1.8.17 -->
<script type="text/javascript" src="menudata.js"></script>
<script type="text/javascript" src="menu.js"></script>
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&amp;dn=gpl-2.0.txt GPL-v2 */
$(function() {
  initMenu('',false,false,'search.php','Search');
});
/* @license-end */</script>
<div id="main-nav"></div>
<div id="nav-path" class="navpath">
  <ul>
<li class="navelem"><a class="el" href="dir_d522931ffa1371640980b621734a4381.html">Users</a></li><li class="navelem"><a class="el" href="dir_70834f0dcd10de01d2e35ab402a2238e.html">tysonjones</a></li><li class="navelem"><a class="el" href="dir_1957401ef452be7528010ba0f4832a45.html">Desktop</a></li><li class="navelem"><a class="el" href="dir_dee4414d5d72b49a9429e079789ffd08.html">GithubRepos</a></li><li class="navelem"><a class="el" href="dir_a89b43d59316bb5045aa22bb53a67d29.html">QuEST</a></li><li class="navelem"><a class="el" href="dir_f1fe56bf5ef15ff22696c757278c6962.html">QuEST</a></li><li class="navelem"><a class="el" href="dir_757750313c878cfe3b7d1ade55b4b819.html">src</a></li>  </ul>
</div>
</div><!-- top -->
<div class="header">
  <div class="summary">
<a href="#func-members">Functions</a>  </div>
  <div class="headertitle">
<div class="title">QuEST.c File Reference</div>  </div>
</div><!--header-->
<div class="contents">
<div class="textblock"><code>#include &quot;<a class="el" href="QuEST_8h_source.html">QuEST.h</a>&quot;</code><br />
<code>#include &quot;<a class="el" href="QuEST__precision_8h_source.html">QuEST_precision.h</a>&quot;</code><br />
<code>#include &quot;<a class="el" href="QuEST__internal_8h_source.html">QuEST_internal.h</a>&quot;</code><br />
<code>#include &quot;<a class="el" href="QuEST__validation_8h_source.html">QuEST_validation.h</a>&quot;</code><br />
<code>#include &quot;<a class="el" href="QuEST__qasm_8h_source.html">QuEST_qasm.h</a>&quot;</code><br />
<code>#include &lt;stdlib.h&gt;</code><br />
<code>#include &lt;string.h&gt;</code><br />
</div>
<p><a href="QuEST_8c_source.html">Go to the source code of this file.</a></p>
<table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="func-members"></a>
Functions</h2></td></tr>
<tr class="memitem:gad2e953390342cd361cfb4064d47715e6"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__operator.html#gad2e953390342cd361cfb4064d47715e6">applyDiagonalOp</a> (<a class="el" href="structQureg.html">Qureg</a> qureg, <a class="el" href="structDiagonalOp.html">DiagonalOp</a> op)</td></tr>
<tr class="memdesc:gad2e953390342cd361cfb4064d47715e6"><td class="mdescLeft">&#160;</td><td class="mdescRight">Apply a diagonal complex operator, which is possibly non-unitary and non-Hermitian, on the entire quantum register.  <a href="group__operator.html#gad2e953390342cd361cfb4064d47715e6">More...</a><br /></td></tr>
<tr class="separator:gad2e953390342cd361cfb4064d47715e6"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:gadfb5c1d99a22ce666fc715a8da2e0950"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__operator.html#gadfb5c1d99a22ce666fc715a8da2e0950">applyMatrix2</a> (<a class="el" href="structQureg.html">Qureg</a> qureg, int targetQubit, <a class="el" href="structComplexMatrix2.html">ComplexMatrix2</a> u)</td></tr>
<tr class="memdesc:gadfb5c1d99a22ce666fc715a8da2e0950"><td class="mdescLeft">&#160;</td><td class="mdescRight">Apply a general 2-by-2 matrix, which may be non-unitary.  <a href="group__operator.html#gadfb5c1d99a22ce666fc715a8da2e0950">More...</a><br /></td></tr>
<tr class="separator:gadfb5c1d99a22ce666fc715a8da2e0950"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga74a955ec4bce606d89317bcfc528387f"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__operator.html#ga74a955ec4bce606d89317bcfc528387f">applyMatrix4</a> (<a class="el" href="structQureg.html">Qureg</a> qureg, int targetQubit1, int targetQubit2, <a class="el" href="structComplexMatrix4.html">ComplexMatrix4</a> u)</td></tr>
<tr class="memdesc:ga74a955ec4bce606d89317bcfc528387f"><td class="mdescLeft">&#160;</td><td class="mdescRight">Apply a general 4-by-4 matrix, which may be non-unitary.  <a href="group__operator.html#ga74a955ec4bce606d89317bcfc528387f">More...</a><br /></td></tr>
<tr class="separator:ga74a955ec4bce606d89317bcfc528387f"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga358e7094a98851afa86d27f0147e32a1"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__operator.html#ga358e7094a98851afa86d27f0147e32a1">applyMatrixN</a> (<a class="el" href="structQureg.html">Qureg</a> qureg, int *targs, int numTargs, <a class="el" href="structComplexMatrixN.html">ComplexMatrixN</a> u)</td></tr>
<tr class="memdesc:ga358e7094a98851afa86d27f0147e32a1"><td class="mdescLeft">&#160;</td><td class="mdescRight">Apply a general N-by-N matrix, which may be non-unitary, on any number of target qubits.  <a href="group__operator.html#ga358e7094a98851afa86d27f0147e32a1">More...</a><br /></td></tr>
<tr class="separator:ga358e7094a98851afa86d27f0147e32a1"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:gab52b6315c5520b7d311b0458785eed8e"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__operator.html#gab52b6315c5520b7d311b0458785eed8e">applyMultiControlledMatrixN</a> (<a class="el" href="structQureg.html">Qureg</a> qureg, int *ctrls, int numCtrls, int *targs, int numTargs, <a class="el" href="structComplexMatrixN.html">ComplexMatrixN</a> u)</td></tr>
<tr class="memdesc:gab52b6315c5520b7d311b0458785eed8e"><td class="mdescLeft">&#160;</td><td class="mdescRight">Apply a general N-by-N matrix, which may be non-unitary, with additional controlled qubits.  <a href="group__operator.html#gab52b6315c5520b7d311b0458785eed8e">More...</a><br /></td></tr>
<tr class="separator:gab52b6315c5520b7d311b0458785eed8e"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga54d4e589468002bdc998200ae45e7312"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__operator.html#ga54d4e589468002bdc998200ae45e7312">applyPauliHamil</a> (<a class="el" href="structQureg.html">Qureg</a> inQureg, <a class="el" href="structPauliHamil.html">PauliHamil</a> hamil, <a class="el" href="structQureg.html">Qureg</a> outQureg)</td></tr>
<tr class="memdesc:ga54d4e589468002bdc998200ae45e7312"><td class="mdescLeft">&#160;</td><td class="mdescRight">Modifies <code>outQureg</code> to be the result of applying <code><a class="el" href="structPauliHamil.html" title="Represents a weighted sum of pauli products.">PauliHamil</a></code> (a Hermitian but not necessarily unitary operator) to <code>inQureg</code>.  <a href="group__operator.html#ga54d4e589468002bdc998200ae45e7312">More...</a><br /></td></tr>
<tr class="separator:ga54d4e589468002bdc998200ae45e7312"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga6fc26cf857db070e12959e59ecfed8a6"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__operator.html#ga6fc26cf857db070e12959e59ecfed8a6">applyPauliSum</a> (<a class="el" href="structQureg.html">Qureg</a> inQureg, enum <a class="el" href="group__type.html#ga1c703cf89629e4e9c7023cd402d67028">pauliOpType</a> *allPauliCodes, <a class="el" href="group__type.html#ga7740e349b4f8bae6451547680f0ce2d6">qreal</a> *termCoeffs, int numSumTerms, <a class="el" href="structQureg.html">Qureg</a> outQureg)</td></tr>
<tr class="memdesc:ga6fc26cf857db070e12959e59ecfed8a6"><td class="mdescLeft">&#160;</td><td class="mdescRight">Modifies <code>outQureg</code> to be the result of applying the weighted sum of Pauli products (a Hermitian but not necessarily unitary operator) to <code>inQureg</code>.  <a href="group__operator.html#ga6fc26cf857db070e12959e59ecfed8a6">More...</a><br /></td></tr>
<tr class="separator:ga6fc26cf857db070e12959e59ecfed8a6"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga35b6321c578a8c69470132b5ee95f930"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__operator.html#ga35b6321c578a8c69470132b5ee95f930">applyTrotterCircuit</a> (<a class="el" href="structQureg.html">Qureg</a> qureg, <a class="el" href="structPauliHamil.html">PauliHamil</a> hamil, <a class="el" href="group__type.html#ga7740e349b4f8bae6451547680f0ce2d6">qreal</a> time, int order, int reps)</td></tr>
<tr class="memdesc:ga35b6321c578a8c69470132b5ee95f930"><td class="mdescLeft">&#160;</td><td class="mdescRight">Applies a trotterisation of unitary evolution <img class="formulaInl" alt="$ \exp(-i \, \text{hamil} \, \text{time}) $" src="form_171.png"/> to <code>qureg</code>.  <a href="group__operator.html#ga35b6321c578a8c69470132b5ee95f930">More...</a><br /></td></tr>
<tr class="separator:ga35b6321c578a8c69470132b5ee95f930"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga658b3a5cab5e73a17a7fd76a83583a22"><td class="memItemLeft" align="right" valign="top"><a class="el" href="group__type.html#ga7740e349b4f8bae6451547680f0ce2d6">qreal</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__calc.html#ga658b3a5cab5e73a17a7fd76a83583a22">calcDensityInnerProduct</a> (<a class="el" href="structQureg.html">Qureg</a> rho1, <a class="el" href="structQureg.html">Qureg</a> rho2)</td></tr>
<tr class="memdesc:ga658b3a5cab5e73a17a7fd76a83583a22"><td class="mdescLeft">&#160;</td><td class="mdescRight">Computes the Hilbert-Schmidt scalar product (which is equivalent to the Frobenius inner product of matrices) of two density matrices <code>rho1</code> and <code>rho2</code> of equivalent size.  <a href="group__calc.html#ga658b3a5cab5e73a17a7fd76a83583a22">More...</a><br /></td></tr>
<tr class="separator:ga658b3a5cab5e73a17a7fd76a83583a22"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga82f17e96a4cb7612fb9c6ef856df3810"><td class="memItemLeft" align="right" valign="top"><a class="el" href="structComplex.html">Complex</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__calc.html#ga82f17e96a4cb7612fb9c6ef856df3810">calcExpecDiagonalOp</a> (<a class="el" href="structQureg.html">Qureg</a> qureg, <a class="el" href="structDiagonalOp.html">DiagonalOp</a> op)</td></tr>
<tr class="memdesc:ga82f17e96a4cb7612fb9c6ef856df3810"><td class="mdescLeft">&#160;</td><td class="mdescRight">Computes the expected value of the diagonal operator <code>op</code> for state <code>qureg</code>.  <a href="group__calc.html#ga82f17e96a4cb7612fb9c6ef856df3810">More...</a><br /></td></tr>
<tr class="separator:ga82f17e96a4cb7612fb9c6ef856df3810"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga5544d2833a69941b8820797b79daf79f"><td class="memItemLeft" align="right" valign="top"><a class="el" href="group__type.html#ga7740e349b4f8bae6451547680f0ce2d6">qreal</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__calc.html#ga5544d2833a69941b8820797b79daf79f">calcExpecPauliHamil</a> (<a class="el" href="structQureg.html">Qureg</a> qureg, <a class="el" href="structPauliHamil.html">PauliHamil</a> hamil, <a class="el" href="structQureg.html">Qureg</a> workspace)</td></tr>
<tr class="memdesc:ga5544d2833a69941b8820797b79daf79f"><td class="mdescLeft">&#160;</td><td class="mdescRight">Computes the expected value of <code>qureg</code> under Hermitian operator <code>hamil</code>.  <a href="group__calc.html#ga5544d2833a69941b8820797b79daf79f">More...</a><br /></td></tr>
<tr class="separator:ga5544d2833a69941b8820797b79daf79f"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga15cfad3f3d26339128e3be32ae7deacd"><td class="memItemLeft" align="right" valign="top"><a class="el" href="group__type.html#ga7740e349b4f8bae6451547680f0ce2d6">qreal</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__calc.html#ga15cfad3f3d26339128e3be32ae7deacd">calcExpecPauliProd</a> (<a class="el" href="structQureg.html">Qureg</a> qureg, int *targetQubits, enum <a class="el" href="group__type.html#ga1c703cf89629e4e9c7023cd402d67028">pauliOpType</a> *pauliCodes, int numTargets, <a class="el" href="structQureg.html">Qureg</a> workspace)</td></tr>
<tr class="memdesc:ga15cfad3f3d26339128e3be32ae7deacd"><td class="mdescLeft">&#160;</td><td class="mdescRight">Computes the expected value of a product of Pauli operators.  <a href="group__calc.html#ga15cfad3f3d26339128e3be32ae7deacd">More...</a><br /></td></tr>
<tr class="separator:ga15cfad3f3d26339128e3be32ae7deacd"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga50ee589fd5ceab52fdd70d0082352b41"><td class="memItemLeft" align="right" valign="top"><a class="el" href="group__type.html#ga7740e349b4f8bae6451547680f0ce2d6">qreal</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__calc.html#ga50ee589fd5ceab52fdd70d0082352b41">calcExpecPauliSum</a> (<a class="el" href="structQureg.html">Qureg</a> qureg, enum <a class="el" href="group__type.html#ga1c703cf89629e4e9c7023cd402d67028">pauliOpType</a> *allPauliCodes, <a class="el" href="group__type.html#ga7740e349b4f8bae6451547680f0ce2d6">qreal</a> *termCoeffs, int numSumTerms, <a class="el" href="structQureg.html">Qureg</a> workspace)</td></tr>
<tr class="memdesc:ga50ee589fd5ceab52fdd70d0082352b41"><td class="mdescLeft">&#160;</td><td class="mdescRight">Computes the expected value of a sum of products of Pauli operators.  <a href="group__calc.html#ga50ee589fd5ceab52fdd70d0082352b41">More...</a><br /></td></tr>
<tr class="separator:ga50ee589fd5ceab52fdd70d0082352b41"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:gaa266ed6c8ae5d0d0f49e1ac50819cffc"><td class="memItemLeft" align="right" valign="top"><a class="el" href="group__type.html#ga7740e349b4f8bae6451547680f0ce2d6">qreal</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__calc.html#gaa266ed6c8ae5d0d0f49e1ac50819cffc">calcFidelity</a> (<a class="el" href="structQureg.html">Qureg</a> qureg, <a class="el" href="structQureg.html">Qureg</a> pureState)</td></tr>
<tr class="memdesc:gaa266ed6c8ae5d0d0f49e1ac50819cffc"><td class="mdescLeft">&#160;</td><td class="mdescRight">Calculates the fidelity of <code>qureg</code> (a statevector or density matrix) against a reference pure state (necessarily a statevector).  <a href="group__calc.html#gaa266ed6c8ae5d0d0f49e1ac50819cffc">More...</a><br /></td></tr>
<tr class="separator:gaa266ed6c8ae5d0d0f49e1ac50819cffc"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga87ddbe5c8281543541ccd99e0dafd387"><td class="memItemLeft" align="right" valign="top"><a class="el" href="group__type.html#ga7740e349b4f8bae6451547680f0ce2d6">qreal</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__calc.html#ga87ddbe5c8281543541ccd99e0dafd387">calcHilbertSchmidtDistance</a> (<a class="el" href="structQureg.html">Qureg</a> a, <a class="el" href="structQureg.html">Qureg</a> b)</td></tr>
<tr class="memdesc:ga87ddbe5c8281543541ccd99e0dafd387"><td class="mdescLeft">&#160;</td><td class="mdescRight">Computes the Hilbert Schmidt distance between two density matrices <code>a</code> and <code>b</code>, defined as the Frobenius norm of the difference between them.  <a href="group__calc.html#ga87ddbe5c8281543541ccd99e0dafd387">More...</a><br /></td></tr>
<tr class="separator:ga87ddbe5c8281543541ccd99e0dafd387"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga374ad70804998394ae41ebfe106258a6"><td class="memItemLeft" align="right" valign="top"><a class="el" href="structComplex.html">Complex</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__calc.html#ga374ad70804998394ae41ebfe106258a6">calcInnerProduct</a> (<a class="el" href="structQureg.html">Qureg</a> bra, <a class="el" href="structQureg.html">Qureg</a> ket)</td></tr>
<tr class="memdesc:ga374ad70804998394ae41ebfe106258a6"><td class="mdescLeft">&#160;</td><td class="mdescRight">Computes the inner product <img class="formulaInl" alt="$ \langle \text{bra} | \text{ket} \rangle $" src="form_84.png"/> of two equal-size state vectors, given by.  <a href="group__calc.html#ga374ad70804998394ae41ebfe106258a6">More...</a><br /></td></tr>
<tr class="separator:ga374ad70804998394ae41ebfe106258a6"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga2a7946e6fa4f44c9ae0c6c9f683229ad"><td class="memItemLeft" align="right" valign="top"><a class="el" href="group__type.html#ga7740e349b4f8bae6451547680f0ce2d6">qreal</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__calc.html#ga2a7946e6fa4f44c9ae0c6c9f683229ad">calcProbOfOutcome</a> (<a class="el" href="structQureg.html">Qureg</a> qureg, int measureQubit, int outcome)</td></tr>
<tr class="memdesc:ga2a7946e6fa4f44c9ae0c6c9f683229ad"><td class="mdescLeft">&#160;</td><td class="mdescRight">Gives the probability of a specified qubit being measured in the given outcome (0 or 1).  <a href="group__calc.html#ga2a7946e6fa4f44c9ae0c6c9f683229ad">More...</a><br /></td></tr>
<tr class="separator:ga2a7946e6fa4f44c9ae0c6c9f683229ad"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga683779343fb2c6055f6b1d01079c2ede"><td class="memItemLeft" align="right" valign="top"><a class="el" href="group__type.html#ga7740e349b4f8bae6451547680f0ce2d6">qreal</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__calc.html#ga683779343fb2c6055f6b1d01079c2ede">calcPurity</a> (<a class="el" href="structQureg.html">Qureg</a> qureg)</td></tr>
<tr class="memdesc:ga683779343fb2c6055f6b1d01079c2ede"><td class="mdescLeft">&#160;</td><td class="mdescRight">Calculates the purity of a density matrix, by the trace of the density matrix squared.  <a href="group__calc.html#ga683779343fb2c6055f6b1d01079c2ede">More...</a><br /></td></tr>
<tr class="separator:ga683779343fb2c6055f6b1d01079c2ede"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:gab082910d33473ec29e1d5852943de468"><td class="memItemLeft" align="right" valign="top"><a class="el" href="group__type.html#ga7740e349b4f8bae6451547680f0ce2d6">qreal</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__calc.html#gab082910d33473ec29e1d5852943de468">calcTotalProb</a> (<a class="el" href="structQureg.html">Qureg</a> qureg)</td></tr>
<tr class="memdesc:gab082910d33473ec29e1d5852943de468"><td class="mdescLeft">&#160;</td><td class="mdescRight">A debugging function which calculates the probability of the qubits in <code>qureg</code> being in any state, which should always be 1 for correctly normalised states (hence returning a real number).  <a href="group__calc.html#gab082910d33473ec29e1d5852943de468">More...</a><br /></td></tr>
<tr class="separator:gab082910d33473ec29e1d5852943de468"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:gab3a410abab3e8beb394bd3bbfae8977c"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__qasm.html#gab3a410abab3e8beb394bd3bbfae8977c">clearRecordedQASM</a> (<a class="el" href="structQureg.html">Qureg</a> qureg)</td></tr>
<tr class="memdesc:gab3a410abab3e8beb394bd3bbfae8977c"><td class="mdescLeft">&#160;</td><td class="mdescRight">Clear all QASM so far recorded.  <a href="group__qasm.html#gab3a410abab3e8beb394bd3bbfae8977c">More...</a><br /></td></tr>
<tr class="separator:gab3a410abab3e8beb394bd3bbfae8977c"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga4534403b721977b669bff7bf4e37f0fb"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__init.html#ga4534403b721977b669bff7bf4e37f0fb">cloneQureg</a> (<a class="el" href="structQureg.html">Qureg</a> targetQureg, <a class="el" href="structQureg.html">Qureg</a> copyQureg)</td></tr>
<tr class="memdesc:ga4534403b721977b669bff7bf4e37f0fb"><td class="mdescLeft">&#160;</td><td class="mdescRight">Set targetQureg to be a clone of copyQureg.  <a href="group__init.html#ga4534403b721977b669bff7bf4e37f0fb">More...</a><br /></td></tr>
<tr class="separator:ga4534403b721977b669bff7bf4e37f0fb"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga34457f7f62ccd75fb7d3fe67cd2f815a"><td class="memItemLeft" align="right" valign="top"><a class="el" href="group__type.html#ga7740e349b4f8bae6451547680f0ce2d6">qreal</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__normgate.html#ga34457f7f62ccd75fb7d3fe67cd2f815a">collapseToOutcome</a> (<a class="el" href="structQureg.html">Qureg</a> qureg, int measureQubit, int outcome)</td></tr>
<tr class="memdesc:ga34457f7f62ccd75fb7d3fe67cd2f815a"><td class="mdescLeft">&#160;</td><td class="mdescRight">Updates <code>qureg</code> to be consistent with measuring <code>measureQubit</code> in the given <code>outcome</code> (0 or 1), and returns the probability of such a measurement outcome.  <a href="group__normgate.html#ga34457f7f62ccd75fb7d3fe67cd2f815a">More...</a><br /></td></tr>
<tr class="separator:ga34457f7f62ccd75fb7d3fe67cd2f815a"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:gaefaa7acba90373efe4e0f0b94987c734"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__unitary.html#gaefaa7acba90373efe4e0f0b94987c734">compactUnitary</a> (<a class="el" href="structQureg.html">Qureg</a> qureg, int targetQubit, <a class="el" href="structComplex.html">Complex</a> alpha, <a class="el" href="structComplex.html">Complex</a> beta)</td></tr>
<tr class="memdesc:gaefaa7acba90373efe4e0f0b94987c734"><td class="mdescLeft">&#160;</td><td class="mdescRight">Apply a single-qubit unitary parameterised by two given complex scalars.  <a href="group__unitary.html#gaefaa7acba90373efe4e0f0b94987c734">More...</a><br /></td></tr>
<tr class="separator:gaefaa7acba90373efe4e0f0b94987c734"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:acb5e66108a5c6cf36642148335c0d9ab"><td class="memItemLeft" align="right" valign="top">int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="QuEST_8c.html#acb5e66108a5c6cf36642148335c0d9ab">compareStates</a> (<a class="el" href="structQureg.html">Qureg</a> qureg1, <a class="el" href="structQureg.html">Qureg</a> qureg2, <a class="el" href="group__type.html#ga7740e349b4f8bae6451547680f0ce2d6">qreal</a> precision)</td></tr>
<tr class="memdesc:acb5e66108a5c6cf36642148335c0d9ab"><td class="mdescLeft">&#160;</td><td class="mdescRight">Return whether two given wavefunctions are equivalent within a given precision Global phase included in equivalence check.  <a href="QuEST_8c.html#acb5e66108a5c6cf36642148335c0d9ab">More...</a><br /></td></tr>
<tr class="separator:acb5e66108a5c6cf36642148335c0d9ab"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:gaf7e15bf09c64082e0a8467998eb25623"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__unitary.html#gaf7e15bf09c64082e0a8467998eb25623">controlledCompactUnitary</a> (<a class="el" href="structQureg.html">Qureg</a> qureg, int controlQubit, int targetQubit, <a class="el" href="structComplex.html">Complex</a> alpha, <a class="el" href="structComplex.html">Complex</a> beta)</td></tr>
<tr class="memdesc:gaf7e15bf09c64082e0a8467998eb25623"><td class="mdescLeft">&#160;</td><td class="mdescRight">Apply a controlled unitary (single control, single target) parameterised by two given complex scalars.  <a href="group__unitary.html#gaf7e15bf09c64082e0a8467998eb25623">More...</a><br /></td></tr>
<tr class="separator:gaf7e15bf09c64082e0a8467998eb25623"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:gaeb975903209000ebbaf50ef1cc353a79"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__unitary.html#gaeb975903209000ebbaf50ef1cc353a79">controlledMultiQubitUnitary</a> (<a class="el" href="structQureg.html">Qureg</a> qureg, int ctrl, int *targs, int numTargs, <a class="el" href="structComplexMatrixN.html">ComplexMatrixN</a> u)</td></tr>
<tr class="memdesc:gaeb975903209000ebbaf50ef1cc353a79"><td class="mdescLeft">&#160;</td><td class="mdescRight">Apply a general controlled multi-qubit unitary (including a global phase factor).  <a href="group__unitary.html#gaeb975903209000ebbaf50ef1cc353a79">More...</a><br /></td></tr>
<tr class="separator:gaeb975903209000ebbaf50ef1cc353a79"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:gaa5a138473a4433c853c6e66e7aabc237"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__unitary.html#gaa5a138473a4433c853c6e66e7aabc237">controlledNot</a> (<a class="el" href="structQureg.html">Qureg</a> qureg, int controlQubit, int targetQubit)</td></tr>
<tr class="memdesc:gaa5a138473a4433c853c6e66e7aabc237"><td class="mdescLeft">&#160;</td><td class="mdescRight">Apply the controlled not (single control, single target) gate, also known as the c-X, c-sigma-X, c-Pauli-X and c-bit-flip gate.  <a href="group__unitary.html#gaa5a138473a4433c853c6e66e7aabc237">More...</a><br /></td></tr>
<tr class="separator:gaa5a138473a4433c853c6e66e7aabc237"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga5e5fdaa7d3dd449b3e2c5d4a01bd015a"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__unitary.html#ga5e5fdaa7d3dd449b3e2c5d4a01bd015a">controlledPauliY</a> (<a class="el" href="structQureg.html">Qureg</a> qureg, int controlQubit, int targetQubit)</td></tr>
<tr class="memdesc:ga5e5fdaa7d3dd449b3e2c5d4a01bd015a"><td class="mdescLeft">&#160;</td><td class="mdescRight">Apply the controlled pauliY (single control, single target) gate, also known as the c-Y and c-sigma-Y gate.  <a href="group__unitary.html#ga5e5fdaa7d3dd449b3e2c5d4a01bd015a">More...</a><br /></td></tr>
<tr class="separator:ga5e5fdaa7d3dd449b3e2c5d4a01bd015a"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga2fa310101ecffd6aeba96f77b7d85f56"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__unitary.html#ga2fa310101ecffd6aeba96f77b7d85f56">controlledPhaseFlip</a> (<a class="el" href="structQureg.html">Qureg</a> qureg, int idQubit1, int idQubit2)</td></tr>
<tr class="memdesc:ga2fa310101ecffd6aeba96f77b7d85f56"><td class="mdescLeft">&#160;</td><td class="mdescRight">Apply the (two-qubit) controlled phase flip gate, also known as the controlled pauliZ gate.  <a href="group__unitary.html#ga2fa310101ecffd6aeba96f77b7d85f56">More...</a><br /></td></tr>
<tr class="separator:ga2fa310101ecffd6aeba96f77b7d85f56"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga7214a79aa22ae7a50ad6f38615968cb0"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__unitary.html#ga7214a79aa22ae7a50ad6f38615968cb0">controlledPhaseShift</a> (<a class="el" href="structQureg.html">Qureg</a> qureg, int idQubit1, int idQubit2, <a class="el" href="group__type.html#ga7740e349b4f8bae6451547680f0ce2d6">qreal</a> angle)</td></tr>
<tr class="memdesc:ga7214a79aa22ae7a50ad6f38615968cb0"><td class="mdescLeft">&#160;</td><td class="mdescRight">Introduce a phase factor <img class="formulaInl" alt="$ \exp(i \theta) $" src="form_19.png"/> on state <img class="formulaInl" alt="$ |11\rangle $" src="form_20.png"/> of qubits <code>idQubit1</code> and <code>idQubit2</code>.  <a href="group__unitary.html#ga7214a79aa22ae7a50ad6f38615968cb0">More...</a><br /></td></tr>
<tr class="separator:ga7214a79aa22ae7a50ad6f38615968cb0"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga0c84c429cb1d7e2596706c1804dd9cba"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__unitary.html#ga0c84c429cb1d7e2596706c1804dd9cba">controlledRotateAroundAxis</a> (<a class="el" href="structQureg.html">Qureg</a> qureg, int controlQubit, int targetQubit, <a class="el" href="group__type.html#ga7740e349b4f8bae6451547680f0ce2d6">qreal</a> angle, <a class="el" href="structVector.html">Vector</a> axis)</td></tr>
<tr class="memdesc:ga0c84c429cb1d7e2596706c1804dd9cba"><td class="mdescLeft">&#160;</td><td class="mdescRight">Applies a controlled rotation by a given angle around a given vector on the Bloch-sphere.  <a href="group__unitary.html#ga0c84c429cb1d7e2596706c1804dd9cba">More...</a><br /></td></tr>
<tr class="separator:ga0c84c429cb1d7e2596706c1804dd9cba"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga13f904b417f647c70d163770e65906fc"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__unitary.html#ga13f904b417f647c70d163770e65906fc">controlledRotateX</a> (<a class="el" href="structQureg.html">Qureg</a> qureg, int controlQubit, int targetQubit, <a class="el" href="group__type.html#ga7740e349b4f8bae6451547680f0ce2d6">qreal</a> angle)</td></tr>
<tr class="memdesc:ga13f904b417f647c70d163770e65906fc"><td class="mdescLeft">&#160;</td><td class="mdescRight">Applies a controlled rotation by a given angle around the X-axis of the Bloch-sphere.  <a href="group__unitary.html#ga13f904b417f647c70d163770e65906fc">More...</a><br /></td></tr>
<tr class="separator:ga13f904b417f647c70d163770e65906fc"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:gafbbded98b7233f5da06d74d1db5cbfdb"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__unitary.html#gafbbded98b7233f5da06d74d1db5cbfdb">controlledRotateY</a> (<a class="el" href="structQureg.html">Qureg</a> qureg, int controlQubit, int targetQubit, <a class="el" href="group__type.html#ga7740e349b4f8bae6451547680f0ce2d6">qreal</a> angle)</td></tr>
<tr class="memdesc:gafbbded98b7233f5da06d74d1db5cbfdb"><td class="mdescLeft">&#160;</td><td class="mdescRight">Applies a controlled rotation by a given angle around the Y-axis of the Bloch-sphere.  <a href="group__unitary.html#gafbbded98b7233f5da06d74d1db5cbfdb">More...</a><br /></td></tr>
<tr class="separator:gafbbded98b7233f5da06d74d1db5cbfdb"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga7eb969c1dd6c949aecf716d2fba71120"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__unitary.html#ga7eb969c1dd6c949aecf716d2fba71120">controlledRotateZ</a> (<a class="el" href="structQureg.html">Qureg</a> qureg, int controlQubit, int targetQubit, <a class="el" href="group__type.html#ga7740e349b4f8bae6451547680f0ce2d6">qreal</a> angle)</td></tr>
<tr class="memdesc:ga7eb969c1dd6c949aecf716d2fba71120"><td class="mdescLeft">&#160;</td><td class="mdescRight">Applies a controlled rotation by a given angle around the Z-axis of the Bloch-sphere.  <a href="group__unitary.html#ga7eb969c1dd6c949aecf716d2fba71120">More...</a><br /></td></tr>
<tr class="separator:ga7eb969c1dd6c949aecf716d2fba71120"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga3d89916b46bc4aaf23e938022e6c89c1"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__unitary.html#ga3d89916b46bc4aaf23e938022e6c89c1">controlledTwoQubitUnitary</a> (<a class="el" href="structQureg.html">Qureg</a> qureg, int controlQubit, int targetQubit1, int targetQubit2, <a class="el" href="structComplexMatrix4.html">ComplexMatrix4</a> u)</td></tr>
<tr class="memdesc:ga3d89916b46bc4aaf23e938022e6c89c1"><td class="mdescLeft">&#160;</td><td class="mdescRight">Apply a general controlled two-qubit unitary (including a global phase factor).  <a href="group__unitary.html#ga3d89916b46bc4aaf23e938022e6c89c1">More...</a><br /></td></tr>
<tr class="separator:ga3d89916b46bc4aaf23e938022e6c89c1"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:gaa3fb996a5cadd098f4acd8aec955cf9c"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__unitary.html#gaa3fb996a5cadd098f4acd8aec955cf9c">controlledUnitary</a> (<a class="el" href="structQureg.html">Qureg</a> qureg, int controlQubit, int targetQubit, <a class="el" href="structComplexMatrix2.html">ComplexMatrix2</a> u)</td></tr>
<tr class="memdesc:gaa3fb996a5cadd098f4acd8aec955cf9c"><td class="mdescLeft">&#160;</td><td class="mdescRight">Apply a general controlled unitary (single control, single target), which can include a global phase factor.  <a href="group__unitary.html#gaa3fb996a5cadd098f4acd8aec955cf9c">More...</a><br /></td></tr>
<tr class="separator:gaa3fb996a5cadd098f4acd8aec955cf9c"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:gabd07eee133dcd4e6ae7c2d2ce4c42978"><td class="memItemLeft" align="right" valign="top"><a class="el" href="structQureg.html">Qureg</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__type.html#gabd07eee133dcd4e6ae7c2d2ce4c42978">createCloneQureg</a> (<a class="el" href="structQureg.html">Qureg</a> qureg, <a class="el" href="structQuESTEnv.html">QuESTEnv</a> env)</td></tr>
<tr class="memdesc:gabd07eee133dcd4e6ae7c2d2ce4c42978"><td class="mdescLeft">&#160;</td><td class="mdescRight">Create a new <a class="el" href="structQureg.html" title="Represents a system of qubits.">Qureg</a> which is an exact clone of the passed qureg, which can be either a statevector or a density matrix.  <a href="group__type.html#gabd07eee133dcd4e6ae7c2d2ce4c42978">More...</a><br /></td></tr>
<tr class="separator:gabd07eee133dcd4e6ae7c2d2ce4c42978"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga815103261fb22ea9690e1427571df00e"><td class="memItemLeft" align="right" valign="top"><a class="el" href="structComplexMatrixN.html">ComplexMatrixN</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__type.html#ga815103261fb22ea9690e1427571df00e">createComplexMatrixN</a> (int numQubits)</td></tr>
<tr class="memdesc:ga815103261fb22ea9690e1427571df00e"><td class="mdescLeft">&#160;</td><td class="mdescRight">Create (dynamically) a square complex matrix which can be passed to the multi-qubit general unitary functions.  <a href="group__type.html#ga815103261fb22ea9690e1427571df00e">More...</a><br /></td></tr>
<tr class="separator:ga815103261fb22ea9690e1427571df00e"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga93e55b6650b408abb30a1d4a8bce757c"><td class="memItemLeft" align="right" valign="top"><a class="el" href="structQureg.html">Qureg</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__type.html#ga93e55b6650b408abb30a1d4a8bce757c">createDensityQureg</a> (int numQubits, <a class="el" href="structQuESTEnv.html">QuESTEnv</a> env)</td></tr>
<tr class="memdesc:ga93e55b6650b408abb30a1d4a8bce757c"><td class="mdescLeft">&#160;</td><td class="mdescRight">Create a <a class="el" href="structQureg.html" title="Represents a system of qubits.">Qureg</a> for qubits which are represented by a density matrix, and can be in mixed states.  <a href="group__type.html#ga93e55b6650b408abb30a1d4a8bce757c">More...</a><br /></td></tr>
<tr class="separator:ga93e55b6650b408abb30a1d4a8bce757c"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:gaebf896dd8d5eeaf9fd896f6cc8e334fe"><td class="memItemLeft" align="right" valign="top"><a class="el" href="structDiagonalOp.html">DiagonalOp</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__type.html#gaebf896dd8d5eeaf9fd896f6cc8e334fe">createDiagonalOp</a> (int numQubits, <a class="el" href="structQuESTEnv.html">QuESTEnv</a> env)</td></tr>
<tr class="memdesc:gaebf896dd8d5eeaf9fd896f6cc8e334fe"><td class="mdescLeft">&#160;</td><td class="mdescRight">Creates a <a class="el" href="structDiagonalOp.html" title="Represents a diagonal complex operator on the full Hilbert state of a Qureg.">DiagonalOp</a> representing a diagonal operator on the full Hilbert space of a <a class="el" href="structQureg.html" title="Represents a system of qubits.">Qureg</a>.  <a href="group__type.html#gaebf896dd8d5eeaf9fd896f6cc8e334fe">More...</a><br /></td></tr>
<tr class="separator:gaebf896dd8d5eeaf9fd896f6cc8e334fe"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga35b28710877c462927366fa602e591cb"><td class="memItemLeft" align="right" valign="top"><a class="el" href="structPauliHamil.html">PauliHamil</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__type.html#ga35b28710877c462927366fa602e591cb">createPauliHamil</a> (int numQubits, int numSumTerms)</td></tr>
<tr class="memdesc:ga35b28710877c462927366fa602e591cb"><td class="mdescLeft">&#160;</td><td class="mdescRight">Create a <code><a class="el" href="structPauliHamil.html" title="Represents a weighted sum of pauli products.">PauliHamil</a></code> instance, which is a Hamiltonian expressed as a real-weighted sum of products of Pauli operators.  <a href="group__type.html#ga35b28710877c462927366fa602e591cb">More...</a><br /></td></tr>
<tr class="separator:ga35b28710877c462927366fa602e591cb"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:gaa77376c5e3518186eb085f37826d6008"><td class="memItemLeft" align="right" valign="top"><a class="el" href="structPauliHamil.html">PauliHamil</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__type.html#gaa77376c5e3518186eb085f37826d6008">createPauliHamilFromFile</a> (char *fn)</td></tr>
<tr class="memdesc:gaa77376c5e3518186eb085f37826d6008"><td class="mdescLeft">&#160;</td><td class="mdescRight">Create a <code><a class="el" href="structPauliHamil.html" title="Represents a weighted sum of pauli products.">PauliHamil</a></code> instance, a real-weighted sum of products of Pauli operators, populated with the data in filename <code>fn</code>.  <a href="group__type.html#gaa77376c5e3518186eb085f37826d6008">More...</a><br /></td></tr>
<tr class="separator:gaa77376c5e3518186eb085f37826d6008"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga3392816c0643414165c2f5caeec17df0"><td class="memItemLeft" align="right" valign="top"><a class="el" href="structQureg.html">Qureg</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__type.html#ga3392816c0643414165c2f5caeec17df0">createQureg</a> (int numQubits, <a class="el" href="structQuESTEnv.html">QuESTEnv</a> env)</td></tr>
<tr class="memdesc:ga3392816c0643414165c2f5caeec17df0"><td class="mdescLeft">&#160;</td><td class="mdescRight">Create a <a class="el" href="structQureg.html" title="Represents a system of qubits.">Qureg</a> object representing a set of qubits which will remain in a pure state.  <a href="group__type.html#ga3392816c0643414165c2f5caeec17df0">More...</a><br /></td></tr>
<tr class="separator:ga3392816c0643414165c2f5caeec17df0"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga9df2f3d86be4a6e9aad481665e5e6753"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__type.html#ga9df2f3d86be4a6e9aad481665e5e6753">destroyComplexMatrixN</a> (<a class="el" href="structComplexMatrixN.html">ComplexMatrixN</a> m)</td></tr>
<tr class="memdesc:ga9df2f3d86be4a6e9aad481665e5e6753"><td class="mdescLeft">&#160;</td><td class="mdescRight">Destroy a <a class="el" href="structComplexMatrixN.html" title="Represents a general 2^N by 2^N matrix of complex numbers.">ComplexMatrixN</a> instance created with <a class="el" href="group__type.html#ga815103261fb22ea9690e1427571df00e" title="Create (dynamically) a square complex matrix which can be passed to the multi-qubit general unitary f...">createComplexMatrixN()</a>  <a href="group__type.html#ga9df2f3d86be4a6e9aad481665e5e6753">More...</a><br /></td></tr>
<tr class="separator:ga9df2f3d86be4a6e9aad481665e5e6753"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga2c59f45fab56708f687b4104ee99bcd1"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__type.html#ga2c59f45fab56708f687b4104ee99bcd1">destroyDiagonalOp</a> (<a class="el" href="structDiagonalOp.html">DiagonalOp</a> op, <a class="el" href="structQuESTEnv.html">QuESTEnv</a> env)</td></tr>
<tr class="memdesc:ga2c59f45fab56708f687b4104ee99bcd1"><td class="mdescLeft">&#160;</td><td class="mdescRight">Destroys a <a class="el" href="structDiagonalOp.html" title="Represents a diagonal complex operator on the full Hilbert state of a Qureg.">DiagonalOp</a> created with <a class="el" href="group__type.html#gaebf896dd8d5eeaf9fd896f6cc8e334fe" title="Creates a DiagonalOp representing a diagonal operator on the full Hilbert space of a Qureg.">createDiagonalOp()</a>, freeing its memory.  <a href="group__type.html#ga2c59f45fab56708f687b4104ee99bcd1">More...</a><br /></td></tr>
<tr class="separator:ga2c59f45fab56708f687b4104ee99bcd1"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:gac1c8ed909b33bd55ae680901006051b6"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__type.html#gac1c8ed909b33bd55ae680901006051b6">destroyPauliHamil</a> (<a class="el" href="structPauliHamil.html">PauliHamil</a> h)</td></tr>
<tr class="memdesc:gac1c8ed909b33bd55ae680901006051b6"><td class="mdescLeft">&#160;</td><td class="mdescRight">Destroy a <code><a class="el" href="structPauliHamil.html" title="Represents a weighted sum of pauli products.">PauliHamil</a></code> instance, created with either <a class="el" href="group__type.html#ga35b28710877c462927366fa602e591cb" title="Create a PauliHamil instance, which is a Hamiltonian expressed as a real-weighted sum of products of ...">createPauliHamil()</a> or <a class="el" href="group__type.html#gaa77376c5e3518186eb085f37826d6008" title="Create a PauliHamil instance, a real-weighted sum of products of Pauli operators, populated with the ...">createPauliHamilFromFile()</a>.  <a href="group__type.html#gac1c8ed909b33bd55ae680901006051b6">More...</a><br /></td></tr>
<tr class="separator:gac1c8ed909b33bd55ae680901006051b6"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga8e1e6ad3254892edc2ee08712ea9d692"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__type.html#ga8e1e6ad3254892edc2ee08712ea9d692">destroyQureg</a> (<a class="el" href="structQureg.html">Qureg</a> qureg, <a class="el" href="structQuESTEnv.html">QuESTEnv</a> env)</td></tr>
<tr class="memdesc:ga8e1e6ad3254892edc2ee08712ea9d692"><td class="mdescLeft">&#160;</td><td class="mdescRight">Deallocate a <a class="el" href="structQureg.html" title="Represents a system of qubits.">Qureg</a> object representing a set of qubits.  <a href="group__type.html#ga8e1e6ad3254892edc2ee08712ea9d692">More...</a><br /></td></tr>
<tr class="separator:ga8e1e6ad3254892edc2ee08712ea9d692"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga30d6f8b7c766c9c9914b2c61a2fc0def"><td class="memItemLeft" align="right" valign="top"><a class="el" href="structComplex.html">Complex</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__calc.html#ga30d6f8b7c766c9c9914b2c61a2fc0def">getAmp</a> (<a class="el" href="structQureg.html">Qureg</a> qureg, long long int index)</td></tr>
<tr class="memdesc:ga30d6f8b7c766c9c9914b2c61a2fc0def"><td class="mdescLeft">&#160;</td><td class="mdescRight">Get the complex amplitude at a given index in the state vector.  <a href="group__calc.html#ga30d6f8b7c766c9c9914b2c61a2fc0def">More...</a><br /></td></tr>
<tr class="separator:ga30d6f8b7c766c9c9914b2c61a2fc0def"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:gadca286c4ad5cde6124d4e80a7ab95a68"><td class="memItemLeft" align="right" valign="top"><a class="el" href="structComplex.html">Complex</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__calc.html#gadca286c4ad5cde6124d4e80a7ab95a68">getDensityAmp</a> (<a class="el" href="structQureg.html">Qureg</a> qureg, long long int row, long long int col)</td></tr>
<tr class="memdesc:gadca286c4ad5cde6124d4e80a7ab95a68"><td class="mdescLeft">&#160;</td><td class="mdescRight">Get an amplitude from a density matrix at a given row and column.  <a href="group__calc.html#gadca286c4ad5cde6124d4e80a7ab95a68">More...</a><br /></td></tr>
<tr class="separator:gadca286c4ad5cde6124d4e80a7ab95a68"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:gad575782de461d9ab0975b38cc7850f1a"><td class="memItemLeft" align="right" valign="top"><a class="el" href="group__type.html#ga7740e349b4f8bae6451547680f0ce2d6">qreal</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__calc.html#gad575782de461d9ab0975b38cc7850f1a">getImagAmp</a> (<a class="el" href="structQureg.html">Qureg</a> qureg, long long int index)</td></tr>
<tr class="memdesc:gad575782de461d9ab0975b38cc7850f1a"><td class="mdescLeft">&#160;</td><td class="mdescRight">Get the imaginary component of the complex probability amplitude at an index in the state vector.  <a href="group__calc.html#gad575782de461d9ab0975b38cc7850f1a">More...</a><br /></td></tr>
<tr class="separator:gad575782de461d9ab0975b38cc7850f1a"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga8cbe422d4981bf06847d229a4c6aa3df"><td class="memItemLeft" align="right" valign="top">long long int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__calc.html#ga8cbe422d4981bf06847d229a4c6aa3df">getNumAmps</a> (<a class="el" href="structQureg.html">Qureg</a> qureg)</td></tr>
<tr class="memdesc:ga8cbe422d4981bf06847d229a4c6aa3df"><td class="mdescLeft">&#160;</td><td class="mdescRight">Get the number of probability amplitudes in a qureg object, given by 2^numQubits.  <a href="group__calc.html#ga8cbe422d4981bf06847d229a4c6aa3df">More...</a><br /></td></tr>
<tr class="separator:ga8cbe422d4981bf06847d229a4c6aa3df"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga73036c778d800703585ab3d8796a915f"><td class="memItemLeft" align="right" valign="top">int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__calc.html#ga73036c778d800703585ab3d8796a915f">getNumQubits</a> (<a class="el" href="structQureg.html">Qureg</a> qureg)</td></tr>
<tr class="memdesc:ga73036c778d800703585ab3d8796a915f"><td class="mdescLeft">&#160;</td><td class="mdescRight">Get the number of qubits in a qureg object.  <a href="group__calc.html#ga73036c778d800703585ab3d8796a915f">More...</a><br /></td></tr>
<tr class="separator:ga73036c778d800703585ab3d8796a915f"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga4a14d22379d399760b0cfc5c8053589b"><td class="memItemLeft" align="right" valign="top"><a class="el" href="group__type.html#ga7740e349b4f8bae6451547680f0ce2d6">qreal</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__calc.html#ga4a14d22379d399760b0cfc5c8053589b">getProbAmp</a> (<a class="el" href="structQureg.html">Qureg</a> qureg, long long int index)</td></tr>
<tr class="memdesc:ga4a14d22379d399760b0cfc5c8053589b"><td class="mdescLeft">&#160;</td><td class="mdescRight">Get the probability of a state-vector at an index in the full state vector.  <a href="group__calc.html#ga4a14d22379d399760b0cfc5c8053589b">More...</a><br /></td></tr>
<tr class="separator:ga4a14d22379d399760b0cfc5c8053589b"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:acd34ae4aa7e7f466316cc104532c85c1"><td class="memItemLeft" align="right" valign="top">int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="QuEST_8c.html#acd34ae4aa7e7f466316cc104532c85c1">getQuEST_PREC</a> (void)</td></tr>
<tr class="separator:acd34ae4aa7e7f466316cc104532c85c1"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga1416145280c62c5dd5ec9bed89b4cd05"><td class="memItemLeft" align="right" valign="top"><a class="el" href="group__type.html#ga7740e349b4f8bae6451547680f0ce2d6">qreal</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__calc.html#ga1416145280c62c5dd5ec9bed89b4cd05">getRealAmp</a> (<a class="el" href="structQureg.html">Qureg</a> qureg, long long int index)</td></tr>
<tr class="memdesc:ga1416145280c62c5dd5ec9bed89b4cd05"><td class="mdescLeft">&#160;</td><td class="mdescRight">Get the real component of the complex probability amplitude at an index in the state vector.  <a href="group__calc.html#ga1416145280c62c5dd5ec9bed89b4cd05">More...</a><br /></td></tr>
<tr class="separator:ga1416145280c62c5dd5ec9bed89b4cd05"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga6532decd6c404189915563492f090e6f"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__unitary.html#ga6532decd6c404189915563492f090e6f">hadamard</a> (<a class="el" href="structQureg.html">Qureg</a> qureg, int targetQubit)</td></tr>
<tr class="memdesc:ga6532decd6c404189915563492f090e6f"><td class="mdescLeft">&#160;</td><td class="mdescRight">Apply the single-qubit Hadamard gate.  <a href="group__unitary.html#ga6532decd6c404189915563492f090e6f">More...</a><br /></td></tr>
<tr class="separator:ga6532decd6c404189915563492f090e6f"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:gada7230491a50cd409f8b00f5ee1db953"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__init.html#gada7230491a50cd409f8b00f5ee1db953">initBlankState</a> (<a class="el" href="structQureg.html">Qureg</a> qureg)</td></tr>
<tr class="memdesc:gada7230491a50cd409f8b00f5ee1db953"><td class="mdescLeft">&#160;</td><td class="mdescRight">Initialises a qureg to have all-zero-amplitudes.  <a href="group__init.html#gada7230491a50cd409f8b00f5ee1db953">More...</a><br /></td></tr>
<tr class="separator:gada7230491a50cd409f8b00f5ee1db953"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga0379e21efca0767a22607fc0e26a5a22"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__init.html#ga0379e21efca0767a22607fc0e26a5a22">initClassicalState</a> (<a class="el" href="structQureg.html">Qureg</a> qureg, long long int stateInd)</td></tr>
<tr class="memdesc:ga0379e21efca0767a22607fc0e26a5a22"><td class="mdescLeft">&#160;</td><td class="mdescRight">Initialise a set of <img class="formulaInl" alt="$ N $" src="form_0.png"/> qubits to the classical state (also known as a "computational basis state") with index <code>stateInd</code>.  <a href="group__init.html#ga0379e21efca0767a22607fc0e26a5a22">More...</a><br /></td></tr>
<tr class="separator:ga0379e21efca0767a22607fc0e26a5a22"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga429f1b90b3ef06c786dec8c7f0eda4ce"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__type.html#ga429f1b90b3ef06c786dec8c7f0eda4ce">initComplexMatrixN</a> (<a class="el" href="structComplexMatrixN.html">ComplexMatrixN</a> m, <a class="el" href="group__type.html#ga7740e349b4f8bae6451547680f0ce2d6">qreal</a> re[][1&lt;&lt; m.numQubits], <a class="el" href="group__type.html#ga7740e349b4f8bae6451547680f0ce2d6">qreal</a> im[][1&lt;&lt; m.numQubits])</td></tr>
<tr class="memdesc:ga429f1b90b3ef06c786dec8c7f0eda4ce"><td class="mdescLeft">&#160;</td><td class="mdescRight">Initialises a <a class="el" href="structComplexMatrixN.html" title="Represents a general 2^N by 2^N matrix of complex numbers.">ComplexMatrixN</a> instance to have the passed <code>real</code> and <code>imag</code> values.  <a href="group__type.html#ga429f1b90b3ef06c786dec8c7f0eda4ce">More...</a><br /></td></tr>
<tr class="separator:ga429f1b90b3ef06c786dec8c7f0eda4ce"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:gaa696c94112e5fbbc996af10dfc4e2c1c"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__debug.html#gaa696c94112e5fbbc996af10dfc4e2c1c">initDebugState</a> (<a class="el" href="structQureg.html">Qureg</a> qureg)</td></tr>
<tr class="memdesc:gaa696c94112e5fbbc996af10dfc4e2c1c"><td class="mdescLeft">&#160;</td><td class="mdescRight">Initialises <code>qureg</code> to be in the un-normalised, non-physical state with with n-th complex amplitude (2n/10 + i(2n+1)/10).  <a href="group__debug.html#gaa696c94112e5fbbc996af10dfc4e2c1c">More...</a><br /></td></tr>
<tr class="separator:gaa696c94112e5fbbc996af10dfc4e2c1c"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga12a6c59ebbfba8bdb9453a4138027d46"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__type.html#ga12a6c59ebbfba8bdb9453a4138027d46">initDiagonalOp</a> (<a class="el" href="structDiagonalOp.html">DiagonalOp</a> op, <a class="el" href="group__type.html#ga7740e349b4f8bae6451547680f0ce2d6">qreal</a> *real, <a class="el" href="group__type.html#ga7740e349b4f8bae6451547680f0ce2d6">qreal</a> *imag)</td></tr>
<tr class="memdesc:ga12a6c59ebbfba8bdb9453a4138027d46"><td class="mdescLeft">&#160;</td><td class="mdescRight">Updates the entire <a class="el" href="structDiagonalOp.html" title="Represents a diagonal complex operator on the full Hilbert state of a Qureg.">DiagonalOp</a> <code>op</code> with the given elements, of which there must be 2^<code>op.numQubits</code>.  <a href="group__type.html#ga12a6c59ebbfba8bdb9453a4138027d46">More...</a><br /></td></tr>
<tr class="separator:ga12a6c59ebbfba8bdb9453a4138027d46"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:gadbe6701dda1d49168f2f23253e370a7a"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__type.html#gadbe6701dda1d49168f2f23253e370a7a">initPauliHamil</a> (<a class="el" href="structPauliHamil.html">PauliHamil</a> hamil, <a class="el" href="group__type.html#ga7740e349b4f8bae6451547680f0ce2d6">qreal</a> *coeffs, enum <a class="el" href="group__type.html#ga1c703cf89629e4e9c7023cd402d67028">pauliOpType</a> *codes)</td></tr>
<tr class="memdesc:gadbe6701dda1d49168f2f23253e370a7a"><td class="mdescLeft">&#160;</td><td class="mdescRight">Initialise a <code><a class="el" href="structPauliHamil.html" title="Represents a weighted sum of pauli products.">PauliHamil</a></code> instance with the given term coefficients and Pauli codes (one for every qubit in every term).  <a href="group__type.html#gadbe6701dda1d49168f2f23253e370a7a">More...</a><br /></td></tr>
<tr class="separator:gadbe6701dda1d49168f2f23253e370a7a"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga234bd34016f08288532791903b9884b5"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__init.html#ga234bd34016f08288532791903b9884b5">initPlusState</a> (<a class="el" href="structQureg.html">Qureg</a> qureg)</td></tr>
<tr class="memdesc:ga234bd34016f08288532791903b9884b5"><td class="mdescLeft">&#160;</td><td class="mdescRight">Initialise a set of <img class="formulaInl" alt="$ N $" src="form_0.png"/> qubits to the plus state <img class="formulaInl" alt="$ {| + \rangle}^{\otimes N} = \frac{1}{\sqrt{2^N}} (| 0 \rangle + | 1 \rangle)^{\otimes N} $" src="form_2.png"/> (and similarly <img class="formulaInl" alt="$ |+\rangle \langle+| $" src="form_3.png"/> for density matrices).  <a href="group__init.html#ga234bd34016f08288532791903b9884b5">More...</a><br /></td></tr>
<tr class="separator:ga234bd34016f08288532791903b9884b5"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga9a348df3e1df623c3d4c4f12c3ee3fe8"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__init.html#ga9a348df3e1df623c3d4c4f12c3ee3fe8">initPureState</a> (<a class="el" href="structQureg.html">Qureg</a> qureg, <a class="el" href="structQureg.html">Qureg</a> pure)</td></tr>
<tr class="memdesc:ga9a348df3e1df623c3d4c4f12c3ee3fe8"><td class="mdescLeft">&#160;</td><td class="mdescRight">Initialise a set of <img class="formulaInl" alt="$ N $" src="form_0.png"/> qubits, which can be a state vector or density matrix, to a given pure state.  <a href="group__init.html#ga9a348df3e1df623c3d4c4f12c3ee3fe8">More...</a><br /></td></tr>
<tr class="separator:ga9a348df3e1df623c3d4c4f12c3ee3fe8"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga4589960486ec43dcd63bd985f1c4f398"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__init.html#ga4589960486ec43dcd63bd985f1c4f398">initStateFromAmps</a> (<a class="el" href="structQureg.html">Qureg</a> qureg, <a class="el" href="group__type.html#ga7740e349b4f8bae6451547680f0ce2d6">qreal</a> *reals, <a class="el" href="group__type.html#ga7740e349b4f8bae6451547680f0ce2d6">qreal</a> *imags)</td></tr>
<tr class="memdesc:ga4589960486ec43dcd63bd985f1c4f398"><td class="mdescLeft">&#160;</td><td class="mdescRight">Initialise qureg by specifying the complete statevector.  <a href="group__init.html#ga4589960486ec43dcd63bd985f1c4f398">More...</a><br /></td></tr>
<tr class="separator:ga4589960486ec43dcd63bd985f1c4f398"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a6456bc310db1989c5b17febdb23c2c93"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="QuEST_8c.html#a6456bc310db1989c5b17febdb23c2c93">initStateFromSingleFile</a> (<a class="el" href="structQureg.html">Qureg</a> *qureg, char filename[200], <a class="el" href="structQuESTEnv.html">QuESTEnv</a> env)</td></tr>
<tr class="memdesc:a6456bc310db1989c5b17febdb23c2c93"><td class="mdescLeft">&#160;</td><td class="mdescRight">Initialises the wavefunction amplitudes according to those specified in a file.  <a href="QuEST_8c.html#a6456bc310db1989c5b17febdb23c2c93">More...</a><br /></td></tr>
<tr class="separator:a6456bc310db1989c5b17febdb23c2c93"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a7ba64480d4c3f7b1c3ea90cc0245f3e8"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="QuEST_8c.html#a7ba64480d4c3f7b1c3ea90cc0245f3e8">initStateOfSingleQubit</a> (<a class="el" href="structQureg.html">Qureg</a> *qureg, int qubitId, int outcome)</td></tr>
<tr class="memdesc:a7ba64480d4c3f7b1c3ea90cc0245f3e8"><td class="mdescLeft">&#160;</td><td class="mdescRight">Initialise the state vector of probability amplitudes such that one qubit is set to 'outcome' and all other qubits are in an equal superposition of zero and one.  <a href="QuEST_8c.html#a7ba64480d4c3f7b1c3ea90cc0245f3e8">More...</a><br /></td></tr>
<tr class="separator:a7ba64480d4c3f7b1c3ea90cc0245f3e8"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga2f049055d4a51d0ea4d1a43b5234dedb"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__init.html#ga2f049055d4a51d0ea4d1a43b5234dedb">initZeroState</a> (<a class="el" href="structQureg.html">Qureg</a> qureg)</td></tr>
<tr class="memdesc:ga2f049055d4a51d0ea4d1a43b5234dedb"><td class="mdescLeft">&#160;</td><td class="mdescRight">Initialise a set of <img class="formulaInl" alt="$ N $" src="form_0.png"/> qubits to the classical zero state <img class="formulaInl" alt="$ {| 0 \rangle}^{\otimes N} $" src="form_1.png"/>.  <a href="group__init.html#ga2f049055d4a51d0ea4d1a43b5234dedb">More...</a><br /></td></tr>
<tr class="separator:ga2f049055d4a51d0ea4d1a43b5234dedb"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga2a3794103125f1e3cfa103f8b1963656"><td class="memItemLeft" align="right" valign="top">int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__normgate.html#ga2a3794103125f1e3cfa103f8b1963656">measure</a> (<a class="el" href="structQureg.html">Qureg</a> qureg, int measureQubit)</td></tr>
<tr class="memdesc:ga2a3794103125f1e3cfa103f8b1963656"><td class="mdescLeft">&#160;</td><td class="mdescRight">Measures a single qubit, collapsing it randomly to 0 or 1.  <a href="group__normgate.html#ga2a3794103125f1e3cfa103f8b1963656">More...</a><br /></td></tr>
<tr class="separator:ga2a3794103125f1e3cfa103f8b1963656"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:gae192ac0759e46c7b20a7182020155240"><td class="memItemLeft" align="right" valign="top">int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__normgate.html#gae192ac0759e46c7b20a7182020155240">measureWithStats</a> (<a class="el" href="structQureg.html">Qureg</a> qureg, int measureQubit, <a class="el" href="group__type.html#ga7740e349b4f8bae6451547680f0ce2d6">qreal</a> *outcomeProb)</td></tr>
<tr class="memdesc:gae192ac0759e46c7b20a7182020155240"><td class="mdescLeft">&#160;</td><td class="mdescRight">Measures a single qubit, collapsing it randomly to 0 or 1, and additionally gives the probability of that outcome.  <a href="group__normgate.html#gae192ac0759e46c7b20a7182020155240">More...</a><br /></td></tr>
<tr class="separator:gae192ac0759e46c7b20a7182020155240"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:gaea8509011985522bae857bd3b13c34ed"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__decoherence.html#gaea8509011985522bae857bd3b13c34ed">mixDamping</a> (<a class="el" href="structQureg.html">Qureg</a> qureg, int targetQubit, <a class="el" href="group__type.html#ga7740e349b4f8bae6451547680f0ce2d6">qreal</a> prob)</td></tr>
<tr class="memdesc:gaea8509011985522bae857bd3b13c34ed"><td class="mdescLeft">&#160;</td><td class="mdescRight">Mixes a density matrix <code>qureg</code> to induce single-qubit amplitude damping (decay to 0 state).  <a href="group__decoherence.html#gaea8509011985522bae857bd3b13c34ed">More...</a><br /></td></tr>
<tr class="separator:gaea8509011985522bae857bd3b13c34ed"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga97d563fa8f4bc51f720bbb653f5480b3"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__decoherence.html#ga97d563fa8f4bc51f720bbb653f5480b3">mixDensityMatrix</a> (<a class="el" href="structQureg.html">Qureg</a> combineQureg, <a class="el" href="group__type.html#ga7740e349b4f8bae6451547680f0ce2d6">qreal</a> otherProb, <a class="el" href="structQureg.html">Qureg</a> otherQureg)</td></tr>
<tr class="memdesc:ga97d563fa8f4bc51f720bbb653f5480b3"><td class="mdescLeft">&#160;</td><td class="mdescRight">Modifies combineQureg to become (1-prob)combineProb + prob otherQureg.  <a href="group__decoherence.html#ga97d563fa8f4bc51f720bbb653f5480b3">More...</a><br /></td></tr>
<tr class="separator:ga97d563fa8f4bc51f720bbb653f5480b3"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:gacc2667ac87482a7afdcb711b74bf732e"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__decoherence.html#gacc2667ac87482a7afdcb711b74bf732e">mixDephasing</a> (<a class="el" href="structQureg.html">Qureg</a> qureg, int targetQubit, <a class="el" href="group__type.html#ga7740e349b4f8bae6451547680f0ce2d6">qreal</a> prob)</td></tr>
<tr class="memdesc:gacc2667ac87482a7afdcb711b74bf732e"><td class="mdescLeft">&#160;</td><td class="mdescRight">Mixes a density matrix <code>qureg</code> to induce single-qubit dephasing noise.  <a href="group__decoherence.html#gacc2667ac87482a7afdcb711b74bf732e">More...</a><br /></td></tr>
<tr class="separator:gacc2667ac87482a7afdcb711b74bf732e"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:gae2ea9255b8b11a4a382231e5604dc4e3"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__decoherence.html#gae2ea9255b8b11a4a382231e5604dc4e3">mixDepolarising</a> (<a class="el" href="structQureg.html">Qureg</a> qureg, int targetQubit, <a class="el" href="group__type.html#ga7740e349b4f8bae6451547680f0ce2d6">qreal</a> prob)</td></tr>
<tr class="memdesc:gae2ea9255b8b11a4a382231e5604dc4e3"><td class="mdescLeft">&#160;</td><td class="mdescRight">Mixes a density matrix <code>qureg</code> to induce single-qubit homogeneous depolarising noise.  <a href="group__decoherence.html#gae2ea9255b8b11a4a382231e5604dc4e3">More...</a><br /></td></tr>
<tr class="separator:gae2ea9255b8b11a4a382231e5604dc4e3"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:gacb7faa9d8afb0f4270c866424fffbccd"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__decoherence.html#gacb7faa9d8afb0f4270c866424fffbccd">mixKrausMap</a> (<a class="el" href="structQureg.html">Qureg</a> qureg, int target, <a class="el" href="structComplexMatrix2.html">ComplexMatrix2</a> *ops, int numOps)</td></tr>
<tr class="memdesc:gacb7faa9d8afb0f4270c866424fffbccd"><td class="mdescLeft">&#160;</td><td class="mdescRight">Apply a general single-qubit Kraus map to a density matrix, as specified by at most four Kraus operators, <img class="formulaInl" alt="$K_i$" src="form_156.png"/> (<code>ops</code>).  <a href="group__decoherence.html#gacb7faa9d8afb0f4270c866424fffbccd">More...</a><br /></td></tr>
<tr class="separator:gacb7faa9d8afb0f4270c866424fffbccd"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga65b4c0944090fae78a37ba3b94811ace"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__decoherence.html#ga65b4c0944090fae78a37ba3b94811ace">mixMultiQubitKrausMap</a> (<a class="el" href="structQureg.html">Qureg</a> qureg, int *targets, int numTargets, <a class="el" href="structComplexMatrixN.html">ComplexMatrixN</a> *ops, int numOps)</td></tr>
<tr class="memdesc:ga65b4c0944090fae78a37ba3b94811ace"><td class="mdescLeft">&#160;</td><td class="mdescRight">Apply a general N-qubit Kraus map to a density matrix, as specified by at most (2N)^2 Kraus operators.  <a href="group__decoherence.html#ga65b4c0944090fae78a37ba3b94811ace">More...</a><br /></td></tr>
<tr class="separator:ga65b4c0944090fae78a37ba3b94811ace"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga9a77f84e1aa7d25d036b14d7d0cd8b61"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__decoherence.html#ga9a77f84e1aa7d25d036b14d7d0cd8b61">mixPauli</a> (<a class="el" href="structQureg.html">Qureg</a> qureg, int qubit, <a class="el" href="group__type.html#ga7740e349b4f8bae6451547680f0ce2d6">qreal</a> probX, <a class="el" href="group__type.html#ga7740e349b4f8bae6451547680f0ce2d6">qreal</a> probY, <a class="el" href="group__type.html#ga7740e349b4f8bae6451547680f0ce2d6">qreal</a> probZ)</td></tr>
<tr class="memdesc:ga9a77f84e1aa7d25d036b14d7d0cd8b61"><td class="mdescLeft">&#160;</td><td class="mdescRight">Mixes a density matrix <code>qureg</code> to induce general single-qubit Pauli noise.  <a href="group__decoherence.html#ga9a77f84e1aa7d25d036b14d7d0cd8b61">More...</a><br /></td></tr>
<tr class="separator:ga9a77f84e1aa7d25d036b14d7d0cd8b61"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga14282bdb1dc65760ca9ecbe6305eb770"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__decoherence.html#ga14282bdb1dc65760ca9ecbe6305eb770">mixTwoQubitDephasing</a> (<a class="el" href="structQureg.html">Qureg</a> qureg, int qubit1, int qubit2, <a class="el" href="group__type.html#ga7740e349b4f8bae6451547680f0ce2d6">qreal</a> prob)</td></tr>
<tr class="memdesc:ga14282bdb1dc65760ca9ecbe6305eb770"><td class="mdescLeft">&#160;</td><td class="mdescRight">Mixes a density matrix <code>qureg</code> to induce two-qubit dephasing noise.  <a href="group__decoherence.html#ga14282bdb1dc65760ca9ecbe6305eb770">More...</a><br /></td></tr>
<tr class="separator:ga14282bdb1dc65760ca9ecbe6305eb770"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:gacfc45a8fc86ee18f60866bbd0c874ed0"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__decoherence.html#gacfc45a8fc86ee18f60866bbd0c874ed0">mixTwoQubitDepolarising</a> (<a class="el" href="structQureg.html">Qureg</a> qureg, int qubit1, int qubit2, <a class="el" href="group__type.html#ga7740e349b4f8bae6451547680f0ce2d6">qreal</a> prob)</td></tr>
<tr class="memdesc:gacfc45a8fc86ee18f60866bbd0c874ed0"><td class="mdescLeft">&#160;</td><td class="mdescRight">Mixes a density matrix <code>qureg</code> to induce two-qubit homogeneous depolarising noise.  <a href="group__decoherence.html#gacfc45a8fc86ee18f60866bbd0c874ed0">More...</a><br /></td></tr>
<tr class="separator:gacfc45a8fc86ee18f60866bbd0c874ed0"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga2cf7dece0efea4207349f872cdcb7e81"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__decoherence.html#ga2cf7dece0efea4207349f872cdcb7e81">mixTwoQubitKrausMap</a> (<a class="el" href="structQureg.html">Qureg</a> qureg, int target1, int target2, <a class="el" href="structComplexMatrix4.html">ComplexMatrix4</a> *ops, int numOps)</td></tr>
<tr class="memdesc:ga2cf7dece0efea4207349f872cdcb7e81"><td class="mdescLeft">&#160;</td><td class="mdescRight">Apply a general two-qubit Kraus map to a density matrix, as specified by at most sixteen Kraus operators.  <a href="group__decoherence.html#ga2cf7dece0efea4207349f872cdcb7e81">More...</a><br /></td></tr>
<tr class="separator:ga2cf7dece0efea4207349f872cdcb7e81"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga3ad6c477edcdbc845fc1143e860fda08"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__unitary.html#ga3ad6c477edcdbc845fc1143e860fda08">multiControlledMultiQubitUnitary</a> (<a class="el" href="structQureg.html">Qureg</a> qureg, int *ctrls, int numCtrls, int *targs, int numTargs, <a class="el" href="structComplexMatrixN.html">ComplexMatrixN</a> u)</td></tr>
<tr class="memdesc:ga3ad6c477edcdbc845fc1143e860fda08"><td class="mdescLeft">&#160;</td><td class="mdescRight">Apply a general multi-controlled multi-qubit unitary (including a global phase factor).  <a href="group__unitary.html#ga3ad6c477edcdbc845fc1143e860fda08">More...</a><br /></td></tr>
<tr class="separator:ga3ad6c477edcdbc845fc1143e860fda08"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:gad76781842af56821ed4e223bd776f057"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__unitary.html#gad76781842af56821ed4e223bd776f057">multiControlledPhaseFlip</a> (<a class="el" href="structQureg.html">Qureg</a> qureg, int *controlQubits, int numControlQubits)</td></tr>
<tr class="memdesc:gad76781842af56821ed4e223bd776f057"><td class="mdescLeft">&#160;</td><td class="mdescRight">Apply the multiple-qubit controlled phase flip gate, also known as the multiple-qubit controlled pauliZ gate.  <a href="group__unitary.html#gad76781842af56821ed4e223bd776f057">More...</a><br /></td></tr>
<tr class="separator:gad76781842af56821ed4e223bd776f057"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga0832e39058d913ad47af44e97a854446"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__unitary.html#ga0832e39058d913ad47af44e97a854446">multiControlledPhaseShift</a> (<a class="el" href="structQureg.html">Qureg</a> qureg, int *controlQubits, int numControlQubits, <a class="el" href="group__type.html#ga7740e349b4f8bae6451547680f0ce2d6">qreal</a> angle)</td></tr>
<tr class="memdesc:ga0832e39058d913ad47af44e97a854446"><td class="mdescLeft">&#160;</td><td class="mdescRight">Introduce a phase factor <img class="formulaInl" alt="$ \exp(i \theta) $" src="form_19.png"/> on state <img class="formulaInl" alt="$ |1 \dots 1 \rangle $" src="form_23.png"/> of the passed qubits.  <a href="group__unitary.html#ga0832e39058d913ad47af44e97a854446">More...</a><br /></td></tr>
<tr class="separator:ga0832e39058d913ad47af44e97a854446"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga65c7879947e398690a5428bd43e143e3"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__unitary.html#ga65c7879947e398690a5428bd43e143e3">multiControlledTwoQubitUnitary</a> (<a class="el" href="structQureg.html">Qureg</a> qureg, int *controlQubits, int numControlQubits, int targetQubit1, int targetQubit2, <a class="el" href="structComplexMatrix4.html">ComplexMatrix4</a> u)</td></tr>
<tr class="memdesc:ga65c7879947e398690a5428bd43e143e3"><td class="mdescLeft">&#160;</td><td class="mdescRight">Apply a general multi-controlled two-qubit unitary (including a global phase factor).  <a href="group__unitary.html#ga65c7879947e398690a5428bd43e143e3">More...</a><br /></td></tr>
<tr class="separator:ga65c7879947e398690a5428bd43e143e3"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:gaa700dc9657ade4cf16f1cad1624c5332"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__unitary.html#gaa700dc9657ade4cf16f1cad1624c5332">multiControlledUnitary</a> (<a class="el" href="structQureg.html">Qureg</a> qureg, int *controlQubits, int numControlQubits, int targetQubit, <a class="el" href="structComplexMatrix2.html">ComplexMatrix2</a> u)</td></tr>
<tr class="memdesc:gaa700dc9657ade4cf16f1cad1624c5332"><td class="mdescLeft">&#160;</td><td class="mdescRight">Apply a general multiple-control single-target unitary, which can include a global phase factor.  <a href="group__unitary.html#gaa700dc9657ade4cf16f1cad1624c5332">More...</a><br /></td></tr>
<tr class="separator:gaa700dc9657ade4cf16f1cad1624c5332"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga20bf9b8a71b8a3ee4651e9497e6d1f4f"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__unitary.html#ga20bf9b8a71b8a3ee4651e9497e6d1f4f">multiQubitUnitary</a> (<a class="el" href="structQureg.html">Qureg</a> qureg, int *targs, int numTargs, <a class="el" href="structComplexMatrixN.html">ComplexMatrixN</a> u)</td></tr>
<tr class="memdesc:ga20bf9b8a71b8a3ee4651e9497e6d1f4f"><td class="mdescLeft">&#160;</td><td class="mdescRight">Apply a general multi-qubit unitary (including a global phase factor) with any number of target qubits.  <a href="group__unitary.html#ga20bf9b8a71b8a3ee4651e9497e6d1f4f">More...</a><br /></td></tr>
<tr class="separator:ga20bf9b8a71b8a3ee4651e9497e6d1f4f"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga34aa4865c92f9aa5d898c91286c9eca5"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__unitary.html#ga34aa4865c92f9aa5d898c91286c9eca5">multiRotatePauli</a> (<a class="el" href="structQureg.html">Qureg</a> qureg, int *targetQubits, enum <a class="el" href="group__type.html#ga1c703cf89629e4e9c7023cd402d67028">pauliOpType</a> *targetPaulis, int numTargets, <a class="el" href="group__type.html#ga7740e349b4f8bae6451547680f0ce2d6">qreal</a> angle)</td></tr>
<tr class="memdesc:ga34aa4865c92f9aa5d898c91286c9eca5"><td class="mdescLeft">&#160;</td><td class="mdescRight">Apply a multi-qubit multi-Pauli rotation on a selected number of qubits.  <a href="group__unitary.html#ga34aa4865c92f9aa5d898c91286c9eca5">More...</a><br /></td></tr>
<tr class="separator:ga34aa4865c92f9aa5d898c91286c9eca5"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga3250d0d95b5d755cad542a6a2372b894"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__unitary.html#ga3250d0d95b5d755cad542a6a2372b894">multiRotateZ</a> (<a class="el" href="structQureg.html">Qureg</a> qureg, int *qubits, int numQubits, <a class="el" href="group__type.html#ga7740e349b4f8bae6451547680f0ce2d6">qreal</a> angle)</td></tr>
<tr class="memdesc:ga3250d0d95b5d755cad542a6a2372b894"><td class="mdescLeft">&#160;</td><td class="mdescRight">Apply a multi-qubit Z rotation on a selected number of qubits.  <a href="group__unitary.html#ga3250d0d95b5d755cad542a6a2372b894">More...</a><br /></td></tr>
<tr class="separator:ga3250d0d95b5d755cad542a6a2372b894"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga41b946a82982c3fa3dc2a7395665bc90"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__unitary.html#ga41b946a82982c3fa3dc2a7395665bc90">multiStateControlledUnitary</a> (<a class="el" href="structQureg.html">Qureg</a> qureg, int *controlQubits, int *controlState, int numControlQubits, int targetQubit, <a class="el" href="structComplexMatrix2.html">ComplexMatrix2</a> u)</td></tr>
<tr class="memdesc:ga41b946a82982c3fa3dc2a7395665bc90"><td class="mdescLeft">&#160;</td><td class="mdescRight">Apply a general multiple-control, conditioned on a specific bit sequence, single-target unitary, which can include a global phase factor.  <a href="group__unitary.html#ga41b946a82982c3fa3dc2a7395665bc90">More...</a><br /></td></tr>
<tr class="separator:ga41b946a82982c3fa3dc2a7395665bc90"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga4193c14cfb918fa3291fb0648058d63e"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__unitary.html#ga4193c14cfb918fa3291fb0648058d63e">pauliX</a> (<a class="el" href="structQureg.html">Qureg</a> qureg, int targetQubit)</td></tr>
<tr class="memdesc:ga4193c14cfb918fa3291fb0648058d63e"><td class="mdescLeft">&#160;</td><td class="mdescRight">Apply the single-qubit Pauli-X (also known as the X, sigma-X, NOT or bit-flip) gate.  <a href="group__unitary.html#ga4193c14cfb918fa3291fb0648058d63e">More...</a><br /></td></tr>
<tr class="separator:ga4193c14cfb918fa3291fb0648058d63e"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga8e0f03e745778a89d6f59c3c25e32df8"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__unitary.html#ga8e0f03e745778a89d6f59c3c25e32df8">pauliY</a> (<a class="el" href="structQureg.html">Qureg</a> qureg, int targetQubit)</td></tr>
<tr class="memdesc:ga8e0f03e745778a89d6f59c3c25e32df8"><td class="mdescLeft">&#160;</td><td class="mdescRight">Apply the single-qubit Pauli-Y (also known as the Y or sigma-Y) gate.  <a href="group__unitary.html#ga8e0f03e745778a89d6f59c3c25e32df8">More...</a><br /></td></tr>
<tr class="separator:ga8e0f03e745778a89d6f59c3c25e32df8"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga5d80b490e3910aa737a81bb597cdfcc9"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__unitary.html#ga5d80b490e3910aa737a81bb597cdfcc9">pauliZ</a> (<a class="el" href="structQureg.html">Qureg</a> qureg, int targetQubit)</td></tr>
<tr class="memdesc:ga5d80b490e3910aa737a81bb597cdfcc9"><td class="mdescLeft">&#160;</td><td class="mdescRight">Apply the single-qubit Pauli-Z (also known as the Z, sigma-Z or phase-flip) gate.  <a href="group__unitary.html#ga5d80b490e3910aa737a81bb597cdfcc9">More...</a><br /></td></tr>
<tr class="separator:ga5d80b490e3910aa737a81bb597cdfcc9"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga26baa057f5db8804825c2d611386753b"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__unitary.html#ga26baa057f5db8804825c2d611386753b">phaseShift</a> (<a class="el" href="structQureg.html">Qureg</a> qureg, int targetQubit, <a class="el" href="group__type.html#ga7740e349b4f8bae6451547680f0ce2d6">qreal</a> angle)</td></tr>
<tr class="memdesc:ga26baa057f5db8804825c2d611386753b"><td class="mdescLeft">&#160;</td><td class="mdescRight">Shift the phase between <img class="formulaInl" alt="$ |0\rangle $" src="form_14.png"/> and <img class="formulaInl" alt="$ |1\rangle $" src="form_15.png"/> of a single qubit by a given angle.  <a href="group__unitary.html#ga26baa057f5db8804825c2d611386753b">More...</a><br /></td></tr>
<tr class="separator:ga26baa057f5db8804825c2d611386753b"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:gacf139d0a54b1f9e5c2f2feff742b8c76"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__qasm.html#gacf139d0a54b1f9e5c2f2feff742b8c76">printRecordedQASM</a> (<a class="el" href="structQureg.html">Qureg</a> qureg)</td></tr>
<tr class="memdesc:gacf139d0a54b1f9e5c2f2feff742b8c76"><td class="mdescLeft">&#160;</td><td class="mdescRight">Print recorded QASM to stdout.  <a href="group__qasm.html#gacf139d0a54b1f9e5c2f2feff742b8c76">More...</a><br /></td></tr>
<tr class="separator:gacf139d0a54b1f9e5c2f2feff742b8c76"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:gab27234d9ccf440bb5e5d834e8f7e3938"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__debug.html#gab27234d9ccf440bb5e5d834e8f7e3938">reportPauliHamil</a> (<a class="el" href="structPauliHamil.html">PauliHamil</a> hamil)</td></tr>
<tr class="memdesc:gab27234d9ccf440bb5e5d834e8f7e3938"><td class="mdescLeft">&#160;</td><td class="mdescRight">Print the <code><a class="el" href="structPauliHamil.html" title="Represents a weighted sum of pauli products.">PauliHamil</a></code> to screen.  <a href="group__debug.html#gab27234d9ccf440bb5e5d834e8f7e3938">More...</a><br /></td></tr>
<tr class="separator:gab27234d9ccf440bb5e5d834e8f7e3938"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:gaa33ed720560d051eb4126b4a534bc4c6"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__debug.html#gaa33ed720560d051eb4126b4a534bc4c6">reportStateToScreen</a> (<a class="el" href="structQureg.html">Qureg</a> qureg, <a class="el" href="structQuESTEnv.html">QuESTEnv</a> env, int reportRank)</td></tr>
<tr class="memdesc:gaa33ed720560d051eb4126b4a534bc4c6"><td class="mdescLeft">&#160;</td><td class="mdescRight">Print the current state vector of probability amplitudes for a set of qubits to standard out.  <a href="group__debug.html#gaa33ed720560d051eb4126b4a534bc4c6">More...</a><br /></td></tr>
<tr class="separator:gaa33ed720560d051eb4126b4a534bc4c6"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga4c708f066b244801e10f538b48b90145"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__unitary.html#ga4c708f066b244801e10f538b48b90145">rotateAroundAxis</a> (<a class="el" href="structQureg.html">Qureg</a> qureg, int rotQubit, <a class="el" href="group__type.html#ga7740e349b4f8bae6451547680f0ce2d6">qreal</a> angle, <a class="el" href="structVector.html">Vector</a> axis)</td></tr>
<tr class="memdesc:ga4c708f066b244801e10f538b48b90145"><td class="mdescLeft">&#160;</td><td class="mdescRight">Rotate a single qubit by a given angle around a given <a class="el" href="structVector.html">Vector</a> on the Bloch-sphere.  <a href="group__unitary.html#ga4c708f066b244801e10f538b48b90145">More...</a><br /></td></tr>
<tr class="separator:ga4c708f066b244801e10f538b48b90145"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga8886a3793b21622c48cf3bad6e15082d"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__unitary.html#ga8886a3793b21622c48cf3bad6e15082d">rotateX</a> (<a class="el" href="structQureg.html">Qureg</a> qureg, int targetQubit, <a class="el" href="group__type.html#ga7740e349b4f8bae6451547680f0ce2d6">qreal</a> angle)</td></tr>
<tr class="memdesc:ga8886a3793b21622c48cf3bad6e15082d"><td class="mdescLeft">&#160;</td><td class="mdescRight">Rotate a single qubit by a given angle around the X-axis of the Bloch-sphere.  <a href="group__unitary.html#ga8886a3793b21622c48cf3bad6e15082d">More...</a><br /></td></tr>
<tr class="separator:ga8886a3793b21622c48cf3bad6e15082d"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga34312ff52cc28bcab3cbd2ff338fd081"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__unitary.html#ga34312ff52cc28bcab3cbd2ff338fd081">rotateY</a> (<a class="el" href="structQureg.html">Qureg</a> qureg, int targetQubit, <a class="el" href="group__type.html#ga7740e349b4f8bae6451547680f0ce2d6">qreal</a> angle)</td></tr>
<tr class="memdesc:ga34312ff52cc28bcab3cbd2ff338fd081"><td class="mdescLeft">&#160;</td><td class="mdescRight">Rotate a single qubit by a given angle around the Y-axis of the Bloch-sphere.  <a href="group__unitary.html#ga34312ff52cc28bcab3cbd2ff338fd081">More...</a><br /></td></tr>
<tr class="separator:ga34312ff52cc28bcab3cbd2ff338fd081"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:gab23a8b022ec83b9d423961ca87cd8cb5"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__unitary.html#gab23a8b022ec83b9d423961ca87cd8cb5">rotateZ</a> (<a class="el" href="structQureg.html">Qureg</a> qureg, int targetQubit, <a class="el" href="group__type.html#ga7740e349b4f8bae6451547680f0ce2d6">qreal</a> angle)</td></tr>
<tr class="memdesc:gab23a8b022ec83b9d423961ca87cd8cb5"><td class="mdescLeft">&#160;</td><td class="mdescRight">Rotate a single qubit by a given angle around the Z-axis of the Bloch-sphere (also known as a phase shift gate).  <a href="group__unitary.html#gab23a8b022ec83b9d423961ca87cd8cb5">More...</a><br /></td></tr>
<tr class="separator:gab23a8b022ec83b9d423961ca87cd8cb5"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:gabc0c64f8adf307d2a44184dc0f8ca66e"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__init.html#gabc0c64f8adf307d2a44184dc0f8ca66e">setAmps</a> (<a class="el" href="structQureg.html">Qureg</a> qureg, long long int startInd, <a class="el" href="group__type.html#ga7740e349b4f8bae6451547680f0ce2d6">qreal</a> *reals, <a class="el" href="group__type.html#ga7740e349b4f8bae6451547680f0ce2d6">qreal</a> *imags, long long int numAmps)</td></tr>
<tr class="memdesc:gabc0c64f8adf307d2a44184dc0f8ca66e"><td class="mdescLeft">&#160;</td><td class="mdescRight">Overwrites a subset of the amplitudes in <code>qureg</code>, with those passed in <code>reals</code> and <code>imags</code>.  <a href="group__init.html#gabc0c64f8adf307d2a44184dc0f8ca66e">More...</a><br /></td></tr>
<tr class="separator:gabc0c64f8adf307d2a44184dc0f8ca66e"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ae85a2c07d2f1ff2265c4bf22e17653eb"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="QuEST_8c.html#ae85a2c07d2f1ff2265c4bf22e17653eb">setDensityAmps</a> (<a class="el" href="structQureg.html">Qureg</a> qureg, <a class="el" href="group__type.html#ga7740e349b4f8bae6451547680f0ce2d6">qreal</a> *reals, <a class="el" href="group__type.html#ga7740e349b4f8bae6451547680f0ce2d6">qreal</a> *imags)</td></tr>
<tr class="memdesc:ae85a2c07d2f1ff2265c4bf22e17653eb"><td class="mdescLeft">&#160;</td><td class="mdescRight">Set elements in the underlying state vector represenation of a density matrix.  <a href="QuEST_8c.html#ae85a2c07d2f1ff2265c4bf22e17653eb">More...</a><br /></td></tr>
<tr class="separator:ae85a2c07d2f1ff2265c4bf22e17653eb"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:gafabb15a6c1cf49f8ecb67e1f35c77c1e"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__type.html#gafabb15a6c1cf49f8ecb67e1f35c77c1e">setDiagonalOpElems</a> (<a class="el" href="structDiagonalOp.html">DiagonalOp</a> op, long long int startInd, <a class="el" href="group__type.html#ga7740e349b4f8bae6451547680f0ce2d6">qreal</a> *real, <a class="el" href="group__type.html#ga7740e349b4f8bae6451547680f0ce2d6">qreal</a> *imag, long long int numElems)</td></tr>
<tr class="memdesc:gafabb15a6c1cf49f8ecb67e1f35c77c1e"><td class="mdescLeft">&#160;</td><td class="mdescRight">Modifies a subset (starting at index <code>startInd</code>) of the elements in <a class="el" href="structDiagonalOp.html" title="Represents a diagonal complex operator on the full Hilbert state of a Qureg.">DiagonalOp</a> <code>op</code> with the given elements, of which there are <code>numElems</code>.  <a href="group__type.html#gafabb15a6c1cf49f8ecb67e1f35c77c1e">More...</a><br /></td></tr>
<tr class="separator:gafabb15a6c1cf49f8ecb67e1f35c77c1e"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga5d0f3f71ea38d3c44597f8c2c2f014d4"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__init.html#ga5d0f3f71ea38d3c44597f8c2c2f014d4">setWeightedQureg</a> (<a class="el" href="structComplex.html">Complex</a> fac1, <a class="el" href="structQureg.html">Qureg</a> qureg1, <a class="el" href="structComplex.html">Complex</a> fac2, <a class="el" href="structQureg.html">Qureg</a> qureg2, <a class="el" href="structComplex.html">Complex</a> facOut, <a class="el" href="structQureg.html">Qureg</a> out)</td></tr>
<tr class="memdesc:ga5d0f3f71ea38d3c44597f8c2c2f014d4"><td class="mdescLeft">&#160;</td><td class="mdescRight">Modifies qureg <code>out</code> to the result of (<code>facOut</code> <code>out</code> + <code>fac1</code> <code>qureg1</code> + <code>fac2</code> <code>qureg2</code>), imposing no constraints on normalisation.  <a href="group__init.html#ga5d0f3f71ea38d3c44597f8c2c2f014d4">More...</a><br /></td></tr>
<tr class="separator:ga5d0f3f71ea38d3c44597f8c2c2f014d4"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga655ffcd4def2e127341c9488f5ca8455"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__unitary.html#ga655ffcd4def2e127341c9488f5ca8455">sGate</a> (<a class="el" href="structQureg.html">Qureg</a> qureg, int targetQubit)</td></tr>
<tr class="memdesc:ga655ffcd4def2e127341c9488f5ca8455"><td class="mdescLeft">&#160;</td><td class="mdescRight">Apply the single-qubit S gate.  <a href="group__unitary.html#ga655ffcd4def2e127341c9488f5ca8455">More...</a><br /></td></tr>
<tr class="separator:ga655ffcd4def2e127341c9488f5ca8455"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga75d5e65f87c68403602a669b9c6d52b0"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__unitary.html#ga75d5e65f87c68403602a669b9c6d52b0">sqrtSwapGate</a> (<a class="el" href="structQureg.html">Qureg</a> qureg, int qb1, int qb2)</td></tr>
<tr class="memdesc:ga75d5e65f87c68403602a669b9c6d52b0"><td class="mdescLeft">&#160;</td><td class="mdescRight">Performs a sqrt SWAP gate between <code>qubit1</code> and <code>qubit2</code>.  <a href="group__unitary.html#ga75d5e65f87c68403602a669b9c6d52b0">More...</a><br /></td></tr>
<tr class="separator:ga75d5e65f87c68403602a669b9c6d52b0"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga65bf1906298ca6355e2942f4923d77b6"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__qasm.html#ga65bf1906298ca6355e2942f4923d77b6">startRecordingQASM</a> (<a class="el" href="structQureg.html">Qureg</a> qureg)</td></tr>
<tr class="memdesc:ga65bf1906298ca6355e2942f4923d77b6"><td class="mdescLeft">&#160;</td><td class="mdescRight">Enable QASM recording.  <a href="group__qasm.html#ga65bf1906298ca6355e2942f4923d77b6">More...</a><br /></td></tr>
<tr class="separator:ga65bf1906298ca6355e2942f4923d77b6"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:gabdaa339967f0955176a4967f01364182"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__qasm.html#gabdaa339967f0955176a4967f01364182">stopRecordingQASM</a> (<a class="el" href="structQureg.html">Qureg</a> qureg)</td></tr>
<tr class="memdesc:gabdaa339967f0955176a4967f01364182"><td class="mdescLeft">&#160;</td><td class="mdescRight">Disable QASM recording.  <a href="group__qasm.html#gabdaa339967f0955176a4967f01364182">More...</a><br /></td></tr>
<tr class="separator:gabdaa339967f0955176a4967f01364182"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga820fd139c035136819e371308c206e36"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__unitary.html#ga820fd139c035136819e371308c206e36">swapGate</a> (<a class="el" href="structQureg.html">Qureg</a> qureg, int qb1, int qb2)</td></tr>
<tr class="memdesc:ga820fd139c035136819e371308c206e36"><td class="mdescLeft">&#160;</td><td class="mdescRight">Performs a SWAP gate between <code>qubit1</code> and <code>qubit2</code>.  <a href="group__unitary.html#ga820fd139c035136819e371308c206e36">More...</a><br /></td></tr>
<tr class="separator:ga820fd139c035136819e371308c206e36"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:gab75d5cdc622d2778bad24e3a8130aab9"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__type.html#gab75d5cdc622d2778bad24e3a8130aab9">syncDiagonalOp</a> (<a class="el" href="structDiagonalOp.html">DiagonalOp</a> op)</td></tr>
<tr class="memdesc:gab75d5cdc622d2778bad24e3a8130aab9"><td class="mdescLeft">&#160;</td><td class="mdescRight">Copy the elements in <a class="el" href="structDiagonalOp.html" title="Represents a diagonal complex operator on the full Hilbert state of a Qureg.">DiagonalOp</a> <code>op.real</code> and <code>op.imag</code> to the persisent GPU memory.  <a href="group__type.html#gab75d5cdc622d2778bad24e3a8130aab9">More...</a><br /></td></tr>
<tr class="separator:gab75d5cdc622d2778bad24e3a8130aab9"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:gac15907193da5a7c48b9610a26e669064"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__unitary.html#gac15907193da5a7c48b9610a26e669064">tGate</a> (<a class="el" href="structQureg.html">Qureg</a> qureg, int targetQubit)</td></tr>
<tr class="memdesc:gac15907193da5a7c48b9610a26e669064"><td class="mdescLeft">&#160;</td><td class="mdescRight">Apply the single-qubit T gate.  <a href="group__unitary.html#gac15907193da5a7c48b9610a26e669064">More...</a><br /></td></tr>
<tr class="separator:gac15907193da5a7c48b9610a26e669064"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:gab525a42d63233f61afeb6be97d89dd36"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__unitary.html#gab525a42d63233f61afeb6be97d89dd36">twoQubitUnitary</a> (<a class="el" href="structQureg.html">Qureg</a> qureg, int targetQubit1, int targetQubit2, <a class="el" href="structComplexMatrix4.html">ComplexMatrix4</a> u)</td></tr>
<tr class="memdesc:gab525a42d63233f61afeb6be97d89dd36"><td class="mdescLeft">&#160;</td><td class="mdescRight">Apply a general two-qubit unitary (including a global phase factor).  <a href="group__unitary.html#gab525a42d63233f61afeb6be97d89dd36">More...</a><br /></td></tr>
<tr class="separator:gab525a42d63233f61afeb6be97d89dd36"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga78b814256f851cac70fdf3cbf9cfc206"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__unitary.html#ga78b814256f851cac70fdf3cbf9cfc206">unitary</a> (<a class="el" href="structQureg.html">Qureg</a> qureg, int targetQubit, <a class="el" href="structComplexMatrix2.html">ComplexMatrix2</a> u)</td></tr>
<tr class="memdesc:ga78b814256f851cac70fdf3cbf9cfc206"><td class="mdescLeft">&#160;</td><td class="mdescRight">Apply a general single-qubit unitary (including a global phase factor).  <a href="group__unitary.html#ga78b814256f851cac70fdf3cbf9cfc206">More...</a><br /></td></tr>
<tr class="separator:ga78b814256f851cac70fdf3cbf9cfc206"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga0054955857ce83b88e127d731796c23d"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__qasm.html#ga0054955857ce83b88e127d731796c23d">writeRecordedQASMToFile</a> (<a class="el" href="structQureg.html">Qureg</a> qureg, char *filename)</td></tr>
<tr class="memdesc:ga0054955857ce83b88e127d731796c23d"><td class="mdescLeft">&#160;</td><td class="mdescRight">Writes recorded QASM to a file, throwing an error if inaccessible.  <a href="group__qasm.html#ga0054955857ce83b88e127d731796c23d">More...</a><br /></td></tr>
<tr class="separator:ga0054955857ce83b88e127d731796c23d"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table>
<a name="details" id="details"></a><h2 class="groupheader">Detailed Description</h2>
<div class="textblock"><p>Implements the <a class="el" href="QuEST_8h.html">QuEST.h</a> API (and some debugging functions) in a hardware-agnostic way, for both pure and mixed states. These functions mostly wrap hardware-specific functions, and should never call eachother.</p>
<p>Density matrices rho of N qubits are flattened to appear as state-vectors |s&gt; of 2N qubits. Operations U rho U^dag are implemented as U^* U |s&gt; and make use of the pure state backend, and often don't need to explicitly compute U^*.</p>
<dl class="section author"><dt>Author</dt><dd>Tyson Jones (architecture, validation, qasm, density matrices) </dd>
<dd>
Ania Brown (<a class="el" href="QuEST_8c.html#ae85a2c07d2f1ff2265c4bf22e17653eb" title="Set elements in the underlying state vector represenation of a density matrix.">setDensityAmps()</a>) </dd>
<dd>
Balint Koczor (Kraus maps, <a class="el" href="group__calc.html#ga658b3a5cab5e73a17a7fd76a83583a22" title="Computes the Hilbert-Schmidt scalar product (which is equivalent to the Frobenius inner product of ma...">calcDensityInnerProduct()</a>) </dd>
<dd>
Nicolas Vogt of HQS (one-qubit damping) </dd></dl>

<p class="definition">Definition in file <a class="el" href="QuEST_8c_source.html">QuEST.c</a>.</p>
</div><h2 class="groupheader">Function Documentation</h2>
<a id="acb5e66108a5c6cf36642148335c0d9ab"></a>
<h2 class="memtitle"><span class="permalink"><a href="#acb5e66108a5c6cf36642148335c0d9ab">&#9670;&nbsp;</a></span>compareStates()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">int compareStates </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="structQureg.html">Qureg</a>&#160;</td>
          <td class="paramname"><em>mq1</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="structQureg.html">Qureg</a>&#160;</td>
          <td class="paramname"><em>mq2</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="group__type.html#ga7740e349b4f8bae6451547680f0ce2d6">qreal</a>&#160;</td>
          <td class="paramname"><em>precision</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Return whether two given wavefunctions are equivalent within a given precision Global phase included in equivalence check. </p>
<p>For debugging purposes. </p>

<p class="definition">Definition at line <a class="el" href="QuEST_8c_source.html#l01303">1303</a> of file <a class="el" href="QuEST_8c_source.html">QuEST.c</a>.</p>
<div class="fragment"><div class="line"><a name="l01303"></a><span class="lineno"> 1303</span>&#160;                                                               {</div>
<div class="line"><a name="l01304"></a><span class="lineno"> 1304</span>&#160;    <a class="code" href="QuEST__validation_8c.html#a87d22240ccfd81827a2a34b8d569d347">validateMatchingQuregDims</a>(qureg1, qureg2, __func__);</div>
<div class="line"><a name="l01305"></a><span class="lineno"> 1305</span>&#160;    <span class="keywordflow">return</span> <a class="code" href="QuEST__internal_8h.html#ae6cecbad32a03416138b321cdc1a2c33">statevec_compareStates</a>(qureg1, qureg2, precision);</div>
<div class="line"><a name="l01306"></a><span class="lineno"> 1306</span>&#160;}</div>
</div><!-- fragment -->
<p class="reference">References <a class="el" href="QuEST__cpu_8c_source.html#l01675">statevec_compareStates()</a>, and <a class="el" href="QuEST__validation_8c_source.html#l00495">validateMatchingQuregDims()</a>.</p>

</div>
</div>
<a id="acd34ae4aa7e7f466316cc104532c85c1"></a>
<h2 class="memtitle"><span class="permalink"><a href="#acd34ae4aa7e7f466316cc104532c85c1">&#9670;&nbsp;</a></span>getQuEST_PREC()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">int getQuEST_PREC </td>
          <td>(</td>
          <td class="paramtype">void&#160;</td>
          <td class="paramname"></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p class="definition">Definition at line <a class="el" href="QuEST_8c_source.html#l01339">1339</a> of file <a class="el" href="QuEST_8c_source.html">QuEST.c</a>.</p>
<div class="fragment"><div class="line"><a name="l01339"></a><span class="lineno"> 1339</span>&#160;                         {</div>
<div class="line"><a name="l01340"></a><span class="lineno"> 1340</span>&#160;  <span class="keywordflow">return</span> <span class="keyword">sizeof</span>(<a class="code" href="group__type.html#ga7740e349b4f8bae6451547680f0ce2d6">qreal</a>)/4;</div>
<div class="line"><a name="l01341"></a><span class="lineno"> 1341</span>&#160;}</div>
</div><!-- fragment -->
<p class="reference">References <a class="el" href="group__type.html#ga7740e349b4f8bae6451547680f0ce2d6">qreal</a>.</p>

</div>
</div>
<a id="a6456bc310db1989c5b17febdb23c2c93"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a6456bc310db1989c5b17febdb23c2c93">&#9670;&nbsp;</a></span>initStateFromSingleFile()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void initStateFromSingleFile </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="structQureg.html">Qureg</a> *&#160;</td>
          <td class="paramname"><em>qureg</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">char&#160;</td>
          <td class="paramname"><em>filename</em>[200], </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="structQuESTEnv.html">QuESTEnv</a>&#160;</td>
          <td class="paramname"><em>env</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Initialises the wavefunction amplitudes according to those specified in a file. </p>
<p>For debugging purpsoses </p>

<p class="definition">Definition at line <a class="el" href="QuEST_8c_source.html#l01312">1312</a> of file <a class="el" href="QuEST_8c_source.html">QuEST.c</a>.</p>
<div class="fragment"><div class="line"><a name="l01312"></a><span class="lineno"> 1312</span>&#160;                                                                             {</div>
<div class="line"><a name="l01313"></a><span class="lineno"> 1313</span>&#160;    <span class="keywordtype">int</span> success = <a class="code" href="QuEST__internal_8h.html#a05756b45f10135bb2eeb07380f806c20">statevec_initStateFromSingleFile</a>(qureg, filename, env);</div>
<div class="line"><a name="l01314"></a><span class="lineno"> 1314</span>&#160;    <a class="code" href="QuEST__validation_8c.html#a6b9523909701f7bd79f2ab7b56a8e6bd">validateFileOpened</a>(success, filename, __func__);</div>
<div class="line"><a name="l01315"></a><span class="lineno"> 1315</span>&#160;}</div>
</div><!-- fragment -->
<p class="reference">References <a class="el" href="QuEST__cpu_8c_source.html#l01625">statevec_initStateFromSingleFile()</a>, and <a class="el" href="QuEST__validation_8c_source.html#l00507">validateFileOpened()</a>.</p>

</div>
</div>
<a id="a7ba64480d4c3f7b1c3ea90cc0245f3e8"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a7ba64480d4c3f7b1c3ea90cc0245f3e8">&#9670;&nbsp;</a></span>initStateOfSingleQubit()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void initStateOfSingleQubit </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="structQureg.html">Qureg</a> *&#160;</td>
          <td class="paramname"><em>qureg</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int&#160;</td>
          <td class="paramname"><em>qubitId</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int&#160;</td>
          <td class="paramname"><em>outcome</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Initialise the state vector of probability amplitudes such that one qubit is set to 'outcome' and all other qubits are in an equal superposition of zero and one. </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramdir">[in,out]</td><td class="paramname">qureg</td><td>object representing the set of qubits to be initialised </td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">qubitId</td><td>id of qubit to set to state 'outcome' </td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">outcome</td><td>value of qubit 'qubitId' to set </td></tr>
  </table>
  </dd>
</dl>

<p class="definition">Definition at line <a class="el" href="QuEST_8c_source.html#l01317">1317</a> of file <a class="el" href="QuEST_8c_source.html">QuEST.c</a>.</p>
<div class="fragment"><div class="line"><a name="l01317"></a><span class="lineno"> 1317</span>&#160;                                                                    {</div>
<div class="line"><a name="l01318"></a><span class="lineno"> 1318</span>&#160;    <a class="code" href="QuEST__validation_8c.html#a72feec2aaa05f98aed7f3c3fee141251">validateStateVecQureg</a>(*qureg, __func__);</div>
<div class="line"><a name="l01319"></a><span class="lineno"> 1319</span>&#160;    <a class="code" href="QuEST__validation_8c.html#ac31c45c5a31c523be0eb26abba6cf598">validateTarget</a>(*qureg, qubitId, __func__);</div>
<div class="line"><a name="l01320"></a><span class="lineno"> 1320</span>&#160;    <a class="code" href="QuEST__validation_8c.html#ad613c75ff252a88e54f911053bd2032c">validateOutcome</a>(outcome, __func__);</div>
<div class="line"><a name="l01321"></a><span class="lineno"> 1321</span>&#160;    <a class="code" href="QuEST__internal_8h.html#a923906770cac0da9e3459bae58de9e64">statevec_initStateOfSingleQubit</a>(qureg, qubitId, outcome);</div>
<div class="line"><a name="l01322"></a><span class="lineno"> 1322</span>&#160;}</div>
</div><!-- fragment -->
<p class="reference">References <a class="el" href="QuEST__cpu_8c_source.html#l01545">statevec_initStateOfSingleQubit()</a>, <a class="el" href="QuEST__validation_8c_source.html#l00487">validateOutcome()</a>, <a class="el" href="QuEST__validation_8c_source.html#l00479">validateStateVecQureg()</a>, and <a class="el" href="QuEST__validation_8c_source.html#l00364">validateTarget()</a>.</p>

</div>
</div>
<a id="ae85a2c07d2f1ff2265c4bf22e17653eb"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ae85a2c07d2f1ff2265c4bf22e17653eb">&#9670;&nbsp;</a></span>setDensityAmps()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void setDensityAmps </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="structQureg.html">Qureg</a>&#160;</td>
          <td class="paramname"><em>qureg</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="group__type.html#ga7740e349b4f8bae6451547680f0ce2d6">qreal</a> *&#160;</td>
          <td class="paramname"><em>reals</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="group__type.html#ga7740e349b4f8bae6451547680f0ce2d6">qreal</a> *&#160;</td>
          <td class="paramname"><em>imags</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Set elements in the underlying state vector represenation of a density matrix. </p>
<p>Not exposed in the public API as this requires an understanding of how the state vector is used to represent a density matrix. Currently can only be used to set all amps. </p>

<p class="definition">Definition at line <a class="el" href="QuEST_8c_source.html#l00790">790</a> of file <a class="el" href="QuEST_8c_source.html">QuEST.c</a>.</p>
<div class="fragment"><div class="line"><a name="l00790"></a><span class="lineno">  790</span>&#160;                                                             {</div>
<div class="line"><a name="l00791"></a><span class="lineno">  791</span>&#160;    <span class="keywordtype">long</span> <span class="keywordtype">long</span> <span class="keywordtype">int</span> numAmps = qureg.<a class="code" href="structQureg.html#adef4935cac95763c29164cf99b144ed4">numAmpsTotal</a>; </div>
<div class="line"><a name="l00792"></a><span class="lineno">  792</span>&#160;    <a class="code" href="QuEST__internal_8h.html#aa121d55f2ca09c06a96ddcd433c60b0f">statevec_setAmps</a>(qureg, 0, reals, imags, numAmps);</div>
<div class="line"><a name="l00793"></a><span class="lineno">  793</span>&#160;    </div>
<div class="line"><a name="l00794"></a><span class="lineno">  794</span>&#160;    <a class="code" href="QuEST__qasm_8c.html#a9a385fde708958617bbeb599064b8dcb">qasm_recordComment</a>(qureg, <span class="stringliteral">&quot;Here, some amplitudes in the density matrix were manually edited.&quot;</span>);</div>
<div class="line"><a name="l00795"></a><span class="lineno">  795</span>&#160;}</div>
</div><!-- fragment -->
<p class="reference">References <a class="el" href="QuEST_8h_source.html#l00215">Qureg::numAmpsTotal</a>, <a class="el" href="QuEST__qasm_8c_source.html#l00120">qasm_recordComment()</a>, and <a class="el" href="QuEST__cpu_8c_source.html#l01237">statevec_setAmps()</a>.</p>

</div>
</div>
</div><!-- contents -->
<div class="ttc" id="aQuEST__validation_8c_html_ac31c45c5a31c523be0eb26abba6cf598"><div class="ttname"><a href="QuEST__validation_8c.html#ac31c45c5a31c523be0eb26abba6cf598">validateTarget</a></div><div class="ttdeci">void validateTarget(Qureg qureg, int targetQubit, const char *caller)</div><div class="ttdef"><b>Definition:</b> <a href="QuEST__validation_8c_source.html#l00364">QuEST_validation.c:364</a></div></div>
<div class="ttc" id="aQuEST__validation_8c_html_ad613c75ff252a88e54f911053bd2032c"><div class="ttname"><a href="QuEST__validation_8c.html#ad613c75ff252a88e54f911053bd2032c">validateOutcome</a></div><div class="ttdeci">void validateOutcome(int outcome, const char *caller)</div><div class="ttdef"><b>Definition:</b> <a href="QuEST__validation_8c_source.html#l00487">QuEST_validation.c:487</a></div></div>
<div class="ttc" id="aQuEST__validation_8c_html_a72feec2aaa05f98aed7f3c3fee141251"><div class="ttname"><a href="QuEST__validation_8c.html#a72feec2aaa05f98aed7f3c3fee141251">validateStateVecQureg</a></div><div class="ttdeci">void validateStateVecQureg(Qureg qureg, const char *caller)</div><div class="ttdef"><b>Definition:</b> <a href="QuEST__validation_8c_source.html#l00479">QuEST_validation.c:479</a></div></div>
<div class="ttc" id="aQuEST__internal_8h_html_a923906770cac0da9e3459bae58de9e64"><div class="ttname"><a href="QuEST__internal_8h.html#a923906770cac0da9e3459bae58de9e64">statevec_initStateOfSingleQubit</a></div><div class="ttdeci">void statevec_initStateOfSingleQubit(Qureg *qureg, int qubitId, int outcome)</div><div class="ttdoc">Initialise the state vector of probability amplitudes such that one qubit is set to 'outcome' and all...</div><div class="ttdef"><b>Definition:</b> <a href="QuEST__cpu_8c_source.html#l01545">QuEST_cpu.c:1545</a></div></div>
<div class="ttc" id="agroup__type_html_ga7740e349b4f8bae6451547680f0ce2d6"><div class="ttname"><a href="group__type.html#ga7740e349b4f8bae6451547680f0ce2d6">qreal</a></div><div class="ttdeci">#define qreal</div></div>
<div class="ttc" id="aQuEST__validation_8c_html_a6b9523909701f7bd79f2ab7b56a8e6bd"><div class="ttname"><a href="QuEST__validation_8c.html#a6b9523909701f7bd79f2ab7b56a8e6bd">validateFileOpened</a></div><div class="ttdeci">void validateFileOpened(int opened, char *fn, const char *caller)</div><div class="ttdef"><b>Definition:</b> <a href="QuEST__validation_8c_source.html#l00507">QuEST_validation.c:507</a></div></div>
<div class="ttc" id="aQuEST__internal_8h_html_aa121d55f2ca09c06a96ddcd433c60b0f"><div class="ttname"><a href="QuEST__internal_8h.html#aa121d55f2ca09c06a96ddcd433c60b0f">statevec_setAmps</a></div><div class="ttdeci">void statevec_setAmps(Qureg qureg, long long int startInd, qreal *reals, qreal *imags, long long int numAmps)</div><div class="ttdef"><b>Definition:</b> <a href="QuEST__cpu_8c_source.html#l01237">QuEST_cpu.c:1237</a></div></div>
<div class="ttc" id="aQuEST__validation_8c_html_a87d22240ccfd81827a2a34b8d569d347"><div class="ttname"><a href="QuEST__validation_8c.html#a87d22240ccfd81827a2a34b8d569d347">validateMatchingQuregDims</a></div><div class="ttdeci">void validateMatchingQuregDims(Qureg qureg1, Qureg qureg2, const char *caller)</div><div class="ttdef"><b>Definition:</b> <a href="QuEST__validation_8c_source.html#l00495">QuEST_validation.c:495</a></div></div>
<div class="ttc" id="aQuEST__qasm_8c_html_a9a385fde708958617bbeb599064b8dcb"><div class="ttname"><a href="QuEST__qasm_8c.html#a9a385fde708958617bbeb599064b8dcb">qasm_recordComment</a></div><div class="ttdeci">void qasm_recordComment(Qureg qureg, char *comment,...)</div><div class="ttdef"><b>Definition:</b> <a href="QuEST__qasm_8c_source.html#l00120">QuEST_qasm.c:120</a></div></div>
<div class="ttc" id="aQuEST__internal_8h_html_a05756b45f10135bb2eeb07380f806c20"><div class="ttname"><a href="QuEST__internal_8h.html#a05756b45f10135bb2eeb07380f806c20">statevec_initStateFromSingleFile</a></div><div class="ttdeci">int statevec_initStateFromSingleFile(Qureg *qureg, char filename[200], QuESTEnv env)</div><div class="ttdef"><b>Definition:</b> <a href="QuEST__cpu_8c_source.html#l01625">QuEST_cpu.c:1625</a></div></div>
<div class="ttc" id="astructQureg_html_adef4935cac95763c29164cf99b144ed4"><div class="ttname"><a href="structQureg.html#adef4935cac95763c29164cf99b144ed4">Qureg::numAmpsTotal</a></div><div class="ttdeci">long long int numAmpsTotal</div><div class="ttdoc">Total number of amplitudes, which are possibly distributed among machines.</div><div class="ttdef"><b>Definition:</b> <a href="QuEST_8h_source.html#l00215">QuEST.h:215</a></div></div>
<div class="ttc" id="aQuEST__internal_8h_html_ae6cecbad32a03416138b321cdc1a2c33"><div class="ttname"><a href="QuEST__internal_8h.html#ae6cecbad32a03416138b321cdc1a2c33">statevec_compareStates</a></div><div class="ttdeci">int statevec_compareStates(Qureg mq1, Qureg mq2, qreal precision)</div><div class="ttdef"><b>Definition:</b> <a href="QuEST__cpu_8c_source.html#l01675">QuEST_cpu.c:1675</a></div></div>
<!-- HTML footer for doxygen 1.8.8-->
<!-- start footer part -->
</div>
</div>
</div>
</div>
</div>
</body>
        <script type="text/javascript" src="boot.js"></script>
</html>
